home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1990-09-09 | 23.0 KB | [TEXT/KAHL] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Sun Sep 9 18:27:54 1990, modified Sun Sep 9 18:27:54 1990, creator Think C, type ASCII, 23020 bytes "Music4CFile.c" , at 0x5a6c 348 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [KAHL] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 4d 75 73 69 63 34 | 43 46 69 6c 65 2e 63 00 |..Music4|CFile.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 59 ec 00 | 00 01 5c a3 10 72 6a a3 |.....Y..|..\..rj.|
|00000060| 10 72 6a 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.rj.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 92 e2 00 00 |........|........|
|00000080| 2f 2a 0d 2a 20 a9 20 47 | 72 61 65 6d 65 20 47 65 |/*.* . G|raeme Ge|
|00000090| 72 72 61 72 64 20 31 39 | 39 30 0d 2a 20 46 61 63 |rrard 19|90.* Fac|
|000000a0| 75 6c 74 79 20 6f 66 20 | 4d 75 73 69 63 2c 20 55 |ulty of |Music, U|
|000000b0| 6e 69 76 65 72 73 69 74 | 79 20 6f 66 20 4d 65 6c |niversit|y of Mel|
|000000c0| 62 6f 75 72 6e 65 0d 2a | 20 50 61 72 6b 76 69 6c |bourne.*| Parkvil|
|000000d0| 6c 65 20 56 69 63 74 6f | 72 69 61 20 33 30 35 32 |le Victo|ria 3052|
|000000e0| 20 41 75 73 74 72 61 6c | 69 61 2e 0d 2a 0d 2a 20 | Austral|ia..*.* |
|000000f0| 41 52 50 41 4e 45 54 3a | 20 67 72 61 65 40 6d 75 |ARPANET:| grae@mu|
|00000100| 72 64 75 2e 75 63 73 2e | 75 6e 69 6d 65 6c 62 2e |rdu.ucs.|unimelb.|
|00000110| 65 64 75 2e 61 75 0d 2a | 20 74 65 6c 65 70 68 6f |edu.au.*| telepho|
|00000120| 6e 65 3a 20 28 36 31 33 | 29 20 33 34 34 20 34 31 |ne: (613|) 344 41|
|00000130| 32 37 2c 20 46 61 78 3a | 20 28 36 31 33 29 20 33 |27, Fax:| (613) 3|
|00000140| 34 34 20 35 33 34 36 0d | 2a 2f 0d 0d 0d 23 69 6e |44 5346.|*/...#in|
|00000150| 63 6c 75 64 65 09 22 4d | 75 73 69 63 34 43 2e 68 |clude."M|usic4C.h|
|00000160| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 4d 75 73 69 |".#inclu|de "Musi|
|00000170| 63 34 43 5f 50 72 6f 74 | 6f 74 79 70 65 2e 68 22 |c4C_Prot|otype.h"|
|00000180| 0d 2f 2a 23 69 6e 63 6c | 75 64 65 09 3c 75 6e 69 |./*#incl|ude.<uni|
|00000190| 78 2e 68 3e 2a 2f 0d 42 | 6f 6f 6c 65 61 6e 09 4f |x.h>*/.B|oolean.O|
|000001a0| 70 65 6e 53 46 57 72 69 | 74 65 28 76 6f 69 64 29 |penSFWri|te(void)|
|000001b0| 3b 0d 42 6f 6f 6c 65 61 | 6e 09 53 65 74 53 46 44 |;.Boolea|n.SetSFD|
|000001c0| 69 72 28 53 74 72 32 35 | 35 2c 20 6c 6f 6e 67 20 |ir(Str25|5, long |
|000001d0| 2a 29 3b 0d 42 6f 6f 6c | 65 61 6e 09 47 65 74 53 |*);.Bool|ean.GetS|
|000001e0| 46 44 69 72 28 53 74 72 | 32 35 35 20 2a 29 3b 0d |FDir(Str|255 *);.|
|000001f0| 42 6f 6f 6c 65 61 6e 09 | 43 6c 6f 73 65 53 46 28 |Boolean.|CloseSF(|
|00000200| 76 6f 69 64 29 3b 0d 42 | 6f 6f 6c 65 61 6e 09 46 |void);.B|oolean.F|
|00000210| 75 6c 6c 46 69 6c 65 4e | 61 6d 65 28 53 74 72 69 |ullFileN|ame(Stri|
|00000220| 6e 67 50 74 72 2c 20 53 | 74 72 69 6e 67 50 74 72 |ngPtr, S|tringPtr|
|00000230| 2c 20 73 68 6f 72 74 2c | 20 6c 6f 6e 67 29 3b 0d |, short,| long);.|
|00000240| 42 6f 6f 6c 65 61 6e 09 | 75 70 64 61 74 65 53 46 |Boolean.|updateSF|
|00000250| 52 65 73 46 69 6c 65 28 | 76 6f 69 64 29 3b 0d 76 |ResFile(|void);.v|
|00000260| 6f 69 64 09 46 69 6e 69 | 73 68 28 76 6f 69 64 29 |oid.Fini|sh(void)|
|00000270| 3b 0d 42 6f 6f 6c 65 61 | 6e 09 53 46 56 6f 6c 44 |;.Boolea|n.SFVolD|
|00000280| 69 72 28 73 68 6f 72 74 | 2c 20 73 68 6f 72 74 20 |ir(short|, short |
|00000290| 2a 2c 20 6c 6f 6e 67 20 | 2a 29 3b 0d 42 6f 6f 6c |*, long |*);.Bool|
|000002a0| 65 61 6e 09 64 6f 53 44 | 32 52 65 73 6f 75 72 63 |ean.doSD|2Resourc|
|000002b0| 65 73 28 76 6f 69 64 29 | 3b 0d 4f 53 45 72 72 09 |es(void)|;.OSErr.|
|000002c0| 46 75 6c 6c 54 6f 46 6f | 6c 64 65 72 28 53 74 72 |FullToFo|lder(Str|
|000002d0| 69 6e 67 50 74 72 2c 20 | 73 68 6f 72 74 20 2a 2c |ingPtr, |short *,|
|000002e0| 20 6c 6f 6e 67 20 2a 29 | 3b 0d 76 6f 69 64 09 46 | long *)|;.void.F|
|000002f0| 69 78 55 70 28 76 6f 69 | 64 29 3b 0d 65 78 74 65 |ixUp(voi|d);.exte|
|00000300| 72 6e 20 76 6f 69 64 20 | 20 53 61 76 65 4d 75 73 |rn void | SaveMus|
|00000310| 69 63 34 43 5f 50 72 65 | 66 73 28 76 6f 69 64 29 |ic4C_Pre|fs(void)|
|00000320| 3b 0d 65 78 74 65 72 6e | 09 76 6f 69 64 09 43 6c |;.extern|.void.Cl|
|00000330| 6f 73 65 50 61 73 73 33 | 49 6e 70 75 74 28 76 6f |osePass3|Input(vo|
|00000340| 69 64 29 3b 0d 0d 42 6f | 6f 6c 65 61 6e 09 53 63 |id);..Bo|olean.Sc|
|00000350| 6f 72 65 46 69 6c 65 49 | 73 4f 70 65 6e 3b 0d 42 |oreFileI|sOpen;.B|
|00000360| 6f 6f 6c 65 61 6e 09 53 | 6f 75 6e 64 46 69 6c 65 |oolean.S|oundFile|
|00000370| 49 73 4f 70 65 6e 3b 0d | 42 6f 6f 6c 65 61 6e 09 |IsOpen;.|Boolean.|
|00000380| 52 65 70 6f 72 74 46 69 | 6c 65 49 73 4f 70 65 6e |ReportFi|leIsOpen|
|00000390| 3b 0d 0d 23 64 65 66 69 | 6e 65 09 53 41 4d 50 4c |;..#defi|ne.SAMPL|
|000003a0| 45 5f 53 49 5a 45 5f 52 | 45 53 09 09 31 30 30 30 |E_SIZE_R|ES..1000|
|000003b0| 0d 23 64 65 66 69 6e 65 | 09 53 41 4d 50 4c 45 5f |.#define|.SAMPLE_|
|000003c0| 52 41 54 45 5f 52 45 53 | 09 09 31 30 30 31 0d 23 |RATE_RES|..1001.#|
|000003d0| 64 65 66 69 6e 65 09 53 | 41 4d 50 4c 45 5f 43 48 |define.S|AMPLE_CH|
|000003e0| 41 4e 4e 45 4c 53 5f 52 | 45 53 09 31 30 30 32 0d |ANNELS_R|ES.1002.|
|000003f0| 0d 0d 53 46 52 65 70 6c | 79 09 09 53 6f 75 6e 64 |..SFRepl|y..Sound|
|00000400| 46 69 6c 65 52 65 70 6c | 79 3b 0d 53 46 52 65 70 |FileRepl|y;.SFRep|
|00000410| 6c 79 09 09 53 63 6f 72 | 65 46 69 6c 65 52 65 70 |ly..Scor|eFileRep|
|00000420| 6c 79 3b 0d 53 74 72 32 | 35 35 09 09 53 6f 75 6e |ly;.Str2|55..Soun|
|00000430| 64 46 69 6c 65 4e 61 6d | 65 3b 0d 69 6f 50 61 72 |dFileNam|e;.ioPar|
|00000440| 61 6d 09 09 6d 79 49 4f | 50 61 72 6d 42 6c 6b 3b |am..myIO|ParmBlk;|
|00000450| 0d 69 6e 74 09 09 09 73 | 66 52 65 73 46 69 6c 65 |.int...s|fResFile|
|00000460| 52 65 66 4e 75 6d 3b 0d | 57 44 50 42 52 65 63 09 |RefNum;.|WDPBRec.|
|00000470| 09 6d 79 57 44 50 61 72 | 61 6d 42 6c 6b 3b 0d 46 |.myWDPar|amBlk;.F|
|00000480| 69 6c 65 50 61 72 61 6d | 09 09 66 50 42 3b 0d 6c |ileParam|..fPB;.l|
|00000490| 6f 6e 67 09 09 09 53 61 | 6d 70 6c 65 52 61 74 65 |ong...Sa|mpleRate|
|000004a0| 3b 0d 65 78 74 65 72 6e | 09 09 4f 53 45 72 72 09 |;.extern|..OSErr.|
|000004b0| 74 68 65 45 72 72 3b 0d | 53 74 72 32 35 35 09 09 |theErr;.|Str255..|
|000004c0| 74 68 65 4d 65 73 73 31 | 2c 20 74 68 65 4d 65 73 |theMess1|, theMes|
|000004d0| 73 32 3b 0d 69 6e 74 09 | 09 09 72 66 69 6c 65 76 |s2;.int.|..rfilev|
|000004e0| 52 65 66 4e 75 6d 3b 0d | 0d 0d 0d 0d 42 6f 6f 6c |RefNum;.|....Bool|
|000004f0| 65 61 6e 0d 4f 70 65 6e | 53 46 57 72 69 74 65 28 |ean.Open|SFWrite(|
|00000500| 29 0d 7b 0d 0d 09 53 46 | 54 79 70 65 4c 69 73 74 |).{...SF|TypeList|
|00000510| 09 74 79 70 65 73 3b 0d | 09 50 6f 69 6e 74 09 09 |.types;.|.Point..|
|00000520| 77 68 65 72 65 3b 0d 09 | 69 6e 74 09 09 09 41 70 |where;..|int...Ap|
|00000530| 70 52 65 73 46 69 6c 65 | 3b 0d 09 65 78 74 65 72 |pResFile|;..exter|
|00000540| 6e 09 09 6c 6f 6e 67 09 | 09 09 53 74 61 72 74 55 |n..long.|..StartU|
|00000550| 70 44 69 72 49 44 3b 0d | 09 65 78 74 65 72 6e 09 |pDirID;.|.extern.|
|00000560| 09 6c 6f 6e 67 09 09 09 | 53 6f 75 6e 64 46 69 6c |.long...|SoundFil|
|00000570| 65 44 69 72 49 44 3b 0d | 09 65 78 74 65 72 6e 09 |eDirID;.|.extern.|
|00000580| 09 69 6e 74 09 09 09 53 | 46 6f 75 74 70 75 74 54 |.int...S|FoutputT|
|00000590| 79 70 65 3b 0d 09 65 78 | 74 65 72 6e 09 09 69 6e |ype;..ex|tern..in|
|000005a0| 74 09 09 09 53 46 53 61 | 76 65 56 52 65 66 3b 0d |t...SFSa|veVRef;.|
|000005b0| 09 65 78 74 65 72 6e 09 | 09 69 6e 74 09 09 09 53 |.extern.|.int...S|
|000005c0| 46 76 52 65 66 4e 75 6d | 3b 0d 09 65 78 74 65 72 |FvRefNum|;..exter|
|000005d0| 6e 09 09 53 74 72 32 35 | 35 09 09 53 46 44 69 72 |n..Str25|5..SFDir|
|000005e0| 65 63 74 6f 72 79 4e 61 | 6d 65 3b 0d 09 69 6e 74 |ectoryNa|me;..int|
|000005f0| 09 63 3b 0d 09 73 68 6f | 72 74 09 76 6f 6c 75 6d |.c;..sho|rt.volum|
|00000600| 65 3b 0d 09 6c 6f 6e 67 | 09 66 6f 6c 64 65 72 3b |e;..long|.folder;|
|00000610| 0d 09 73 68 6f 72 74 20 | 77 64 3b 0d 09 65 78 74 |..short |wd;..ext|
|00000620| 65 72 6e 09 09 09 69 6e | 74 09 09 09 6e 63 68 6e |ern...in|t...nchn|
|00000630| 6c 73 3b 09 09 2f 2a 20 | 6e 75 6d 62 65 72 20 6f |ls;../* |number o|
|00000640| 66 20 6f 75 74 70 75 74 | 20 63 68 61 6e 6e 65 6c |f output| channel|
|00000650| 73 20 2a 2f 0d 09 0d 09 | 69 66 20 28 20 53 46 44 |s */....|if ( SFD|
|00000660| 69 72 65 63 74 6f 72 79 | 4e 61 6d 65 5b 30 5d 20 |irectory|Name[0] |
|00000670| 21 3d 20 4e 49 4c 20 29 | 20 7b 0d 09 09 69 66 20 |!= NIL )| {...if |
|00000680| 28 20 21 53 65 74 53 46 | 44 69 72 28 53 46 44 69 |( !SetSF|Dir(SFDi|
|00000690| 72 65 63 74 6f 72 79 4e | 61 6d 65 2c 20 26 53 6f |rectoryN|ame, &So|
|000006a0| 75 6e 64 46 69 6c 65 44 | 69 72 49 44 29 20 29 20 |undFileD|irID) ) |
|000006b0| 7b 0d 09 09 09 43 75 72 | 44 69 72 53 74 6f 72 65 |{....Cur|DirStore|
|000006c0| 20 3d 20 53 74 61 72 74 | 55 70 44 69 72 49 44 3b | = Start|UpDirID;|
|000006d0| 0d 09 09 09 72 65 74 75 | 72 6e 28 46 41 4c 53 45 |....retu|rn(FALSE|
|000006e0| 29 3b 0d 09 09 7d 0d 09 | 7d 0d 09 50 73 74 72 69 |);...}..|}..Pstri|
|000006f0| 6e 67 43 6f 70 79 28 28 | 63 68 61 72 20 2a 29 53 |ngCopy((|char *)S|
|00000700| 6f 75 6e 64 46 69 6c 65 | 4e 61 6d 65 2c 20 28 63 |oundFile|Name, (c|
|00000710| 68 61 72 20 2a 29 53 63 | 6f 72 65 46 69 6c 65 52 |har *)Sc|oreFileR|
|00000720| 65 70 6c 79 2e 66 4e 61 | 6d 65 29 3b 0d 09 50 74 |eply.fNa|me);..Pt|
|00000730| 6f 43 73 74 72 28 28 63 | 68 61 72 20 2a 29 53 6f |oCstr((c|har *)So|
|00000740| 75 6e 64 46 69 6c 65 4e | 61 6d 65 29 3b 0d 09 63 |undFileN|ame);..c|
|00000750| 20 3d 20 73 74 72 63 73 | 70 6e 28 28 63 68 61 72 | = strcs|pn((char|
|00000760| 20 2a 29 53 6f 75 6e 64 | 46 69 6c 65 4e 61 6d 65 | *)Sound|FileName|
|00000770| 2c 22 2e 22 29 3b 0d 09 | 73 77 69 74 63 68 28 53 |,".");..|switch(S|
|00000780| 46 6f 75 74 70 75 74 54 | 79 70 65 29 20 7b 0d 09 |FoutputT|ype) {..|
|00000790| 09 63 61 73 65 09 49 4e | 54 31 36 3a 0d 09 09 09 |.case.IN|T16:....|
|000007a0| 73 74 72 63 70 79 28 28 | 63 68 61 72 20 2a 29 53 |strcpy((|char *)S|
|000007b0| 6f 75 6e 64 46 69 6c 65 | 4e 61 6d 65 2b 63 2c 20 |oundFile|Name+c, |
|000007c0| 22 2e 49 4e 54 31 36 22 | 29 3b 0d 09 09 09 62 72 |".INT16"|);....br|
|000007d0| 65 61 6b 3b 0d 09 09 63 | 61 73 65 09 41 49 46 46 |eak;...c|ase.AIFF|
|000007e0| 3a 0d 09 09 09 73 74 72 | 63 70 79 28 28 63 68 61 |:....str|cpy((cha|
|000007f0| 72 20 2a 29 53 6f 75 6e | 64 46 69 6c 65 4e 61 6d |r *)Soun|dFileNam|
|00000800| 65 2b 63 2c 20 22 2e 41 | 49 46 22 29 3b 0d 09 09 |e+c, ".A|IF");...|
|00000810| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 09 53 |.break;.|..case.S|
|00000820| 44 3a 0d 09 09 09 73 74 | 72 63 70 79 28 28 63 68 |D:....st|rcpy((ch|
|00000830| 61 72 20 2a 29 53 6f 75 | 6e 64 46 69 6c 65 4e 61 |ar *)Sou|ndFileNa|
|00000840| 6d 65 2b 63 2c 20 22 2e | 53 44 22 29 3b 0d 09 09 |me+c, ".|SD");...|
|00000850| 09 62 72 65 61 6b 3b 0d | 09 09 63 61 73 65 09 46 |.break;.|..case.F|
|00000860| 4c 4f 41 54 3a 0d 09 09 | 09 73 74 72 63 70 79 28 |LOAT:...|.strcpy(|
|00000870| 28 63 68 61 72 20 2a 29 | 53 6f 75 6e 64 46 69 6c |(char *)|SoundFil|
|00000880| 65 4e 61 6d 65 2b 63 2c | 20 22 2e 46 4c 4f 41 54 |eName+c,| ".FLOAT|
|00000890| 22 29 3b 0d 09 09 09 62 | 72 65 61 6b 3b 0d 09 7d |");....b|reak;..}|
|000008a0| 0d 09 0d 09 43 74 6f 50 | 73 74 72 28 28 63 68 61 |....CtoP|str((cha|
|000008b0| 72 20 2a 29 53 6f 75 6e | 64 46 69 6c 65 4e 61 6d |r *)Soun|dFileNam|
|000008c0| 65 29 3b 0d 09 0d 09 53 | 65 74 50 74 28 26 77 68 |e);....S|etPt(&wh|
|000008d0| 65 72 65 2c 20 31 30 30 | 2c 20 31 30 30 29 3b 0d |ere, 100|, 100);.|
|000008e0| 09 53 46 50 75 74 46 69 | 6c 65 28 77 68 65 72 65 |.SFPutFi|le(where|
|000008f0| 2c 20 22 5c 70 53 6f 75 | 6e 64 20 46 69 6c 65 20 |, "\pSou|nd File |
|00000900| 6e 61 6d 65 3a 22 2c 20 | 26 53 6f 75 6e 64 46 69 |name:", |&SoundFi|
|00000910| 6c 65 4e 61 6d 65 2c 20 | 4e 49 4c 2c 20 26 53 6f |leName, |NIL, &So|
|00000920| 75 6e 64 46 69 6c 65 52 | 65 70 6c 79 29 3b 0d 09 |undFileR|eply);..|
|00000930| 69 66 28 21 53 6f 75 6e | 64 46 69 6c 65 52 65 70 |if(!Soun|dFileRep|
|00000940| 6c 79 2e 67 6f 6f 64 29 | 0d 09 09 72 65 74 75 72 |ly.good)|...retur|
|00000950| 6e 28 46 41 4c 53 45 29 | 3b 0d 09 09 0d 09 47 65 |n(FALSE)|;.....Ge|
|00000960| 74 53 46 44 69 72 28 26 | 53 46 44 69 72 65 63 74 |tSFDir(&|SFDirect|
|00000970| 6f 72 79 4e 61 6d 65 29 | 3b 0d 09 2f 2a 20 77 65 |oryName)|;../* we|
|00000980| 20 6e 6f 77 20 68 61 76 | 65 20 74 68 65 20 64 69 | now hav|e the di|
|00000990| 72 65 63 74 6f 72 79 20 | 77 68 65 72 65 20 74 68 |rectory |where th|
|000009a0| 65 20 73 6f 75 6e 64 20 | 66 69 6c 65 20 69 73 20 |e sound |file is |
|000009b0| 74 6f 20 62 65 20 63 72 | 65 61 74 65 64 2c 0d 09 |to be cr|eated,..|
|000009c0| 73 61 76 65 20 69 74 20 | 69 6e 20 74 68 65 20 4d |save it |in the M|
|000009d0| 75 73 69 63 34 43 5f 50 | 72 65 66 73 20 66 69 6c |usic4C_P|refs fil|
|000009e0| 65 20 2a 2f 0d 09 53 61 | 76 65 4d 75 73 69 63 34 |e */..Sa|veMusic4|
|000009f0| 43 5f 50 72 65 66 73 28 | 29 3b 0d 09 53 65 74 53 |C_Prefs(|);..SetS|
|00000a00| 46 44 69 72 28 53 46 44 | 69 72 65 63 74 6f 72 79 |FDir(SFD|irectory|
|00000a10| 4e 61 6d 65 2c 20 26 53 | 6f 75 6e 64 46 69 6c 65 |Name, &S|oundFile|
|00000a20| 44 69 72 49 44 29 3b 0d | 0d 09 50 73 74 72 69 6e |DirID);.|..Pstrin|
|00000a30| 67 43 6f 70 79 28 28 63 | 68 61 72 20 2a 29 53 6f |gCopy((c|har *)So|
|00000a40| 75 6e 64 46 69 6c 65 4e | 61 6d 65 2c 20 28 63 68 |undFileN|ame, (ch|
|00000a50| 61 72 20 2a 29 53 6f 75 | 6e 64 46 69 6c 65 52 65 |ar *)Sou|ndFileRe|
|00000a60| 70 6c 79 2e 66 4e 61 6d | 65 29 3b 0d 09 6d 79 49 |ply.fNam|e);..myI|
|00000a70| 4f 50 61 72 6d 42 6c 6b | 2e 69 6f 4e 61 6d 65 50 |OParmBlk|.ioNameP|
|00000a80| 74 72 20 3d 20 28 53 74 | 72 69 6e 67 50 74 72 29 |tr = (St|ringPtr)|
|00000a90| 53 6f 75 6e 64 46 69 6c | 65 4e 61 6d 65 3b 0d 09 |SoundFil|eName;..|
|00000aa0| 6d 79 49 4f 50 61 72 6d | 42 6c 6b 2e 69 6f 56 52 |myIOParm|Blk.ioVR|
|00000ab0| 65 66 4e 75 6d 20 3d 20 | 53 6f 75 6e 64 46 69 6c |efNum = |SoundFil|
|00000ac0| 65 52 65 70 6c 79 2e 76 | 52 65 66 4e 75 6d 3b 0d |eReply.v|RefNum;.|
|00000ad0| 09 6d 79 49 4f 50 61 72 | 6d 42 6c 6b 2e 69 6f 56 |.myIOPar|mBlk.ioV|
|00000ae0| 65 72 73 4e 75 6d 20 3d | 20 53 6f 75 6e 64 46 69 |ersNum =| SoundFi|
|00000af0| 6c 65 52 65 70 6c 79 2e | 76 65 72 73 69 6f 6e 3b |leReply.|version;|
|00000b00| 0d 0d 09 69 66 20 28 20 | 28 74 68 65 45 72 72 20 |...if ( |(theErr |
|00000b10| 3d 20 50 42 43 72 65 61 | 74 65 28 26 6d 79 49 4f |= PBCrea|te(&myIO|
|00000b20| 50 61 72 6d 42 6c 6b 2c | 20 46 41 4c 53 45 29 29 |ParmBlk,| FALSE))|
|00000b30| 20 21 3d 20 6e 6f 45 72 | 72 20 29 20 7b 0d 09 09 | != noEr|r ) {...|
|00000b40| 69 66 20 28 20 74 68 65 | 45 72 72 20 3d 3d 20 64 |if ( the|Err == d|
|00000b50| 75 70 46 4e 45 72 72 20 | 29 20 7b 09 2f 2a 20 73 |upFNErr |) {./* s|
|00000b60| 65 74 20 6c 6f 67 69 63 | 61 6c 20 45 4f 46 27 73 |et logic|al EOF's|
|00000b70| 20 74 6f 20 7a 65 72 6f | 20 2a 2f 0d 09 09 09 6d | to zero| */....m|
|00000b80| 79 49 4f 50 61 72 6d 42 | 6c 6b 2e 69 6f 50 65 72 |yIOParmB|lk.ioPer|
|00000b90| 6d 73 73 6e 20 3d 20 66 | 73 57 72 50 65 72 6d 3b |mssn = f|sWrPerm;|
|00000ba0| 0d 09 09 09 6d 79 49 4f | 50 61 72 6d 42 6c 6b 2e |....myIO|ParmBlk.|
|00000bb0| 69 6f 4d 69 73 63 20 3d | 20 28 50 74 72 29 4e 49 |ioMisc =| (Ptr)NI|
|00000bc0| 4c 3b 0d 09 09 09 74 68 | 65 45 72 72 20 3d 20 50 |L;....th|eErr = P|
|00000bd0| 42 4f 70 65 6e 28 26 6d | 79 49 4f 50 61 72 6d 42 |BOpen(&m|yIOParmB|
|00000be0| 6c 6b 2c 20 46 41 4c 53 | 45 29 3b 0d 09 09 09 69 |lk, FALS|E);....i|
|00000bf0| 66 20 28 20 74 68 65 45 | 72 72 20 21 3d 20 6e 6f |f ( theE|rr != no|
|00000c00| 45 72 72 20 29 20 7b 0d | 09 09 09 09 50 73 74 72 |Err ) {.|....Pstr|
|00000c10| 69 6e 67 43 6f 70 79 28 | 28 63 68 61 72 20 2a 29 |ingCopy(|(char *)|
|00000c20| 74 68 65 4d 65 73 73 31 | 2c 20 22 5c 70 45 72 72 |theMess1|, "\pErr|
|00000c30| 6f 72 20 6f 70 65 6e 69 | 6e 67 20 73 6f 75 6e 64 |or openi|ng sound|
|00000c40| 20 66 69 6c 65 3a 22 29 | 3b 0d 09 09 09 09 4f 53 | file:")|;.....OS|
|00000c50| 45 72 72 6f 72 28 74 68 | 65 4d 65 73 73 31 2c 20 |Error(th|eMess1, |
|00000c60| 53 6f 75 6e 64 46 69 6c | 65 4e 61 6d 65 2c 20 74 |SoundFil|eName, t|
|00000c70| 68 65 45 72 72 29 3b 0d | 09 09 09 09 43 75 72 44 |heErr);.|....CurD|
|00000c80| 69 72 53 74 6f 72 65 20 | 3d 20 53 74 61 72 74 55 |irStore |= StartU|
|00000c90| 70 44 69 72 49 44 3b 0d | 09 09 09 09 72 65 74 75 |pDirID;.|....retu|
|00000ca0| 72 6e 28 46 41 4c 53 45 | 29 3b 0d 09 09 09 7d 0d |rn(FALSE|);....}.|
|00000cb0| 09 09 09 6d 79 49 4f 50 | 61 72 6d 42 6c 6b 2e 69 |...myIOP|armBlk.i|
|00000cc0| 6f 4d 69 73 63 20 3d 20 | 28 50 74 72 29 31 3b 0d |oMisc = |(Ptr)1;.|
|00000cd0| 09 09 09 74 68 65 45 72 | 72 20 3d 20 50 42 53 65 |...theEr|r = PBSe|
|00000ce0| 74 45 4f 46 28 26 6d 79 | 49 4f 50 61 72 6d 42 6c |tEOF(&my|IOParmBl|
|00000cf0| 6b 2c 20 46 41 4c 53 45 | 29 3b 0d 09 09 09 69 66 |k, FALSE|);....if|
|00000d00| 20 28 20 74 68 65 45 72 | 72 20 21 3d 20 6e 6f 45 | ( theEr|r != noE|
|00000d10| 72 72 20 29 20 7b 0d 09 | 09 09 09 50 73 74 72 69 |rr ) {..|...Pstri|
|00000d20| 6e 67 43 6f 70 79 28 28 | 63 68 61 72 20 2a 29 74 |ngCopy((|char *)t|
|00000d30| 68 65 4d 65 73 73 31 2c | 20 22 5c 70 45 72 72 6f |heMess1,| "\pErro|
|00000d40| 72 20 73 65 74 74 69 6e | 67 20 45 4f 46 20 66 6f |r settin|g EOF fo|
|00000d50| 72 20 73 6f 75 6e 64 20 | 66 69 6c 65 3a 22 29 3b |r sound |file:");|
|00000d60| 0d 09 09 09 09 4f 53 45 | 72 72 6f 72 28 74 68 65 |.....OSE|rror(the|
|00000d70| 4d 65 73 73 31 2c 20 53 | 6f 75 6e 64 46 69 6c 65 |Mess1, S|oundFile|
|00000d80| 4e 61 6d 65 2c 20 74 68 | 65 45 72 72 29 3b 0d 09 |Name, th|eErr);..|
|00000d90| 09 09 09 43 75 72 44 69 | 72 53 74 6f 72 65 20 3d |...CurDi|rStore =|
|00000da0| 20 53 74 61 72 74 55 70 | 44 69 72 49 44 3b 0d 09 | StartUp|DirID;..|
|00000db0| 09 09 09 72 65 74 75 72 | 6e 28 46 41 4c 53 45 29 |...retur|n(FALSE)|
|00000dc0| 3b 0d 09 09 09 7d 0d 09 | 09 09 74 68 65 45 72 72 |;....}..|..theErr|
|00000dd0| 20 3d 20 50 42 43 6c 6f | 73 65 28 26 6d 79 49 4f | = PBClo|se(&myIO|
|00000de0| 50 61 72 6d 42 6c 6b 2c | 20 46 41 4c 53 45 29 3b |ParmBlk,| FALSE);|
|00000df0| 0d 09 09 09 69 66 20 28 | 20 74 68 65 45 72 72 20 |....if (| theErr |
|00000e00| 21 3d 20 6e 6f 45 72 72 | 20 29 20 7b 0d 09 09 09 |!= noErr| ) {....|
|00000e10| 09 50 73 74 72 69 6e 67 | 43 6f 70 79 28 28 63 68 |.Pstring|Copy((ch|
|00000e20| 61 72 20 2a 29 74 68 65 | 4d 65 73 73 31 2c 20 22 |ar *)the|Mess1, "|
|00000e30| 5c 70 45 72 72 6f 72 20 | 77 68 69 6c 65 20 73 65 |\pError |while se|
|00000e40| 74 74 69 6e 67 20 45 4f | 46 20 66 6f 72 20 73 6f |tting EO|F for so|
|00000e50| 75 6e 64 20 66 69 6c 65 | 3a 22 29 3b 0d 09 09 09 |und file|:");....|
|00000e60| 09 4f 53 45 72 72 6f 72 | 28 74 68 65 4d 65 73 73 |.OSError|(theMess|
|00000e70| 31 2c 20 53 6f 75 6e 64 | 46 69 6c 65 4e 61 6d 65 |1, Sound|FileName|
|00000e80| 2c 20 74 68 65 45 72 72 | 29 3b 0d 09 09 09 09 43 |, theErr|);.....C|
|00000e90| 75 72 44 69 72 53 74 6f | 72 65 20 3d 20 53 74 61 |urDirSto|re = Sta|
|00000ea0| 72 74 55 70 44 69 72 49 | 44 3b 0d 09 09 09 09 72 |rtUpDirI|D;.....r|
|00000eb0| 65 74 75 72 6e 28 46 41 | 4c 53 45 29 3b 0d 09 09 |eturn(FA|LSE);...|
|00000ec0| 09 7d 0d 09 09 0d 09 09 | 09 2f 2a 20 64 6f 20 72 |.}......|./* do r|
|00000ed0| 65 73 6f 75 72 63 65 20 | 66 6f 72 6b 20 2a 2f 0d |esource |fork */.|
|00000ee0| 09 09 09 6d 79 49 4f 50 | 61 72 6d 42 6c 6b 2e 69 |...myIOP|armBlk.i|
|00000ef0| 6f 4d 69 73 63 20 3d 20 | 28 50 74 72 29 4e 49 4c |oMisc = |(Ptr)NIL|
|00000f00| 3b 0d 09 09 09 74 68 65 | 45 72 72 20 3d 20 50 42 |;....the|Err = PB|
|00000f10| 4f 70 65 6e 52 46 28 26 | 6d 79 49 4f 50 61 72 6d |OpenRF(&|myIOParm|
|00000f20| 42 6c 6b 2c 20 46 41 4c | 53 45 29 3b 0d 09 09 09 |Blk, FAL|SE);....|
|00000f30| 69 66 20 28 20 74 68 65 | 45 72 72 20 21 3d 20 6e |if ( the|Err != n|
|00000f40| 6f 45 72 72 20 29 20 7b | 0d 09 09 09 09 50 73 74 |oErr ) {|.....Pst|
|00000f50| 72 69 6e 67 43 6f 70 79 | 28 28 63 68 61 72 20 2a |ringCopy|((char *|
|00000f60| 29 74 68 65 4d 65 73 73 | 31 2c 20 22 5c 70 45 72 |)theMess|1, "\pEr|
|00000f70| 72 6f 72 20 6f 70 65 6e | 69 6e 67 20 73 6f 75 6e |ror open|ing soun|
|00000f80| 64 20 66 69 6c 65 20 72 | 65 73 6f 75 72 63 65 20 |d file r|esource |
|00000f90| 66 6f 72 6b 3a 22 29 3b | 0d 09 09 09 09 4f 53 45 |fork:");|.....OSE|
|00000fa0| 72 72 6f 72 28 74 68 65 | 4d 65 73 73 31 2c 20 53 |rror(the|Mess1, S|
|00000fb0| 6f 75 6e 64 46 69 6c 65 | 4e 61 6d 65 2c 20 74 68 |oundFile|Name, th|
|00000fc0| 65 45 72 72 29 3b 0d 09 | 09 09 09 43 75 72 44 69 |eErr);..|...CurDi|
|00000fd0| 72 53 74 6f 72 65 20 3d | 20 53 74 61 72 74 55 70 |rStore =| StartUp|
|00000fe0| 44 69 72 49 44 3b 0d 09 | 09 09 09 72 65 74 75 72 |DirID;..|...retur|
|00000ff0| 6e 28 46 41 4c 53 45 29 | 3b 0d 09 09 09 7d 0d 09 |n(FALSE)|;....}..|
|00001000| 09 09 74 68 65 45 72 72 | 20 3d 20 50 42 53 65 74 |..theErr| = PBSet|
|00001010| 45 4f 46 28 26 6d 79 49 | 4f 50 61 72 6d 42 6c 6b |EOF(&myI|OParmBlk|
|00001020| 2c 20 46 41 4c 53 45 29 | 3b 0d 09 09 09 69 66 20 |, FALSE)|;....if |
|00001030| 28 20 74 68 65 45 72 72 | 20 21 3d 20 6e 6f 45 72 |( theErr| != noEr|
|00001040| 72 20 29 20 7b 0d 09 09 | 09 09 50 73 74 72 69 6e |r ) {...|..Pstrin|
|00001050| 67 43 6f 70 79 28 28 63 | 68 61 72 20 2a 29 74 68 |gCopy((c|har *)th|
|00001060| 65 4d 65 73 73 31 2c 20 | 22 5c 70 45 72 72 6f 72 |eMess1, |"\pError|
|00001070| 20 73 65 74 74 69 6e 67 | 20 45 4f 46 20 66 6f 72 | setting| EOF for|
|00001080| 20 73 6f 75 6e 64 20 66 | 69 6c 65 20 72 65 73 6f | sound f|ile reso|
|00001090| 75 72 63 65 20 66 6f 72 | 6b 3a 22 29 3b 0d 09 09 |urce for|k:");...|
|000010a0| 09 09 4f 53 45 72 72 6f | 72 28 74 68 65 4d 65 73 |..OSErro|r(theMes|
|000010b0| 73 31 2c 20 53 6f 75 6e | 64 46 69 6c 65 4e 61 6d |s1, Soun|dFileNam|
|000010c0| 65 2c 20 74 68 65 45 72 | 72 29 3b 0d 09 09 09 09 |e, theEr|r);.....|
|000010d0| 43 75 72 44 69 72 53 74 | 6f 72 65 20 3d 20 53 74 |CurDirSt|ore = St|
|000010e0| 61 72 74 55 70 44 69 72 | 49 44 3b 0d 09 09 09 09 |artUpDir|ID;.....|
|000010f0| 72 65 74 75 72 6e 28 46 | 41 4c 53 45 29 3b 0d 09 |return(F|ALSE);..|
|00001100| 09 09 7d 0d 09 09 09 2f | 2a 20 63 6c 6f 73 65 20 |..}..../|* close |
|00001110| 72 65 73 6f 75 72 63 65 | 20 66 6f 72 6b 20 2a 2f |resource| fork */|
|00001120| 0d 09 09 09 74 68 65 45 | 72 72 20 3d 20 50 42 43 |....theE|rr = PBC|
|00001130| 6c 6f 73 65 28 26 6d 79 | 49 4f 50 61 72 6d 42 6c |lose(&my|IOParmBl|
|00001140| 6b 2c 20 46 41 4c 53 45 | 29 3b 0d 09 09 09 69 66 |k, FALSE|);....if|
|00001150| 20 28 20 74 68 65 45 72 | 72 20 21 3d 20 6e 6f 45 | ( theEr|r != noE|
|00001160| 72 72 20 29 20 7b 0d 09 | 09 09 09 50 73 74 72 69 |rr ) {..|...Pstri|
|00001170| 6e 67 43 6f 70 79 28 28 | 63 68 61 72 20 2a 29 74 |ngCopy((|char *)t|
|00001180| 68 65 4d 65 73 73 31 2c | 20 22 5c 70 45 72 72 6f |heMess1,| "\pErro|
|00001190| 72 20 77 68 69 6c 65 20 | 73 65 74 74 69 6e 67 20 |r while |setting |
|000011a0| 45 4f 46 20 66 6f 72 20 | 73 6f 75 6e 64 20 66 69 |EOF for |sound fi|
|000011b0| 6c 65 3a 22 29 3b 0d 09 | 09 09 09 4f 53 45 72 72 |le:");..|...OSErr|
|000011c0| 6f 72 28 74 68 65 4d 65 | 73 73 31 2c 20 53 6f 75 |or(theMe|ss1, Sou|
|000011d0| 6e 64 46 69 6c 65 4e 61 | 6d 65 2c 20 74 68 65 45 |ndFileNa|me, theE|
|000011e0| 72 72 29 3b 0d 09 09 09 | 09 43 75 72 44 69 72 53 |rr);....|.CurDirS|
|000011f0| 74 6f 72 65 20 3d 20 53 | 74 61 72 74 55 70 44 69 |tore = S|tartUpDi|
|00001200| 72 49 44 3b 0d 09 09 09 | 09 72 65 74 75 72 6e 28 |rID;....|.return(|
|00001210| 46 41 4c 53 45 29 3b 0d | 09 09 09 7d 0d 09 09 09 |FALSE);.|...}....|
|00001220| 0d 09 09 7d 0d 09 09 65 | 6c 73 65 20 7b 20 2f 2a |...}...e|lse { /*|
|00001230| 20 65 72 72 6f 72 20 6f | 74 68 65 72 20 74 68 61 | error o|ther tha|
|00001240| 6e 20 64 75 70 46 4e 65 | 72 72 20 2a 2f 0d 09 09 |n dupFNe|rr */...|
|00001250| 09 50 73 74 72 69 6e 67 | 43 6f 70 79 28 28 63 68 |.Pstring|Copy((ch|
|00001260| 61 72 20 2a 29 74 68 65 | 4d 65 73 73 31 2c 20 22 |ar *)the|Mess1, "|
|00001270| 5c 70 4f 70 65 6e 53 46 | 57 72 69 74 65 20 45 72 |\pOpenSF|Write Er|
|00001280| 72 6f 72 20 63 72 65 61 | 74 69 6e 67 20 66 69 6c |ror crea|ting fil|
|00001290| 65 3a 22 29 3b 0d 09 09 | 09 09 4f 53 45 72 72 6f |e:");...|..OSErro|
|000012a0| 72 28 74 68 65 4d 65 73 | 73 31 2c 20 53 6f 75 6e |r(theMes|s1, Soun|
|000012b0| 64 46 69 6c 65 4e 61 6d | 65 2c 20 74 68 65 45 72 |dFileNam|e, theEr|
|000012c0| 72 29 3b 0d 09 09 09 43 | 75 72 44 69 72 53 74 6f |r);....C|urDirSto|
|000012d0| 72 65 20 3d 20 53 74 61 | 72 74 55 70 44 69 72 49 |re = Sta|rtUpDirI|
|000012e0| 44 3b 0d 09 09 09 72 65 | 74 75 72 6e 28 46 41 4c |D;....re|turn(FAL|
|000012f0| 53 45 29 3b 0d 09 09 7d | 0d 09 7d 0d 09 65 6c 73 |SE);...}|..}..els|
|00001300| 65 20 7b 20 2f 2a 20 6e | 65 77 20 66 69 6c 65 73 |e { /* n|ew files|
|00001310| 20 6f 6e 6c 79 20 2a 2f | 0d 09 7d 0d 0d 0d 09 66 | only */|..}....f|
|00001320| 50 42 2e 69 6f 43 6f 6d | 70 6c 65 74 69 6f 6e 20 |PB.ioCom|pletion |
|00001330| 3d 20 28 50 72 6f 63 50 | 74 72 29 4e 49 4c 3b 0d |= (ProcP|tr)NIL;.|
|00001340| 09 66 50 42 2e 69 6f 4e | 61 6d 65 50 74 72 20 3d |.fPB.ioN|amePtr =|
|00001350| 20 6d 79 49 4f 50 61 72 | 6d 42 6c 6b 2e 69 6f 4e | myIOPar|mBlk.ioN|
|00001360| 61 6d 65 50 74 72 3b 0d | 09 66 50 42 2e 69 6f 56 |amePtr;.|.fPB.ioV|
|00001370| 52 65 66 4e 75 6d 20 3d | 20 6d 79 49 4f 50 61 72 |RefNum =| myIOPar|
|00001380| 6d 42 6c 6b 2e 69 6f 56 | 52 65 66 4e 75 6d 3b 0d |mBlk.ioV|RefNum;.|
|00001390| 09 66 50 42 2e 69 6f 46 | 56 65 72 73 4e 75 6d 20 |.fPB.ioF|VersNum |
|000013a0| 3d 20 6d 79 49 4f 50 61 | 72 6d 42 6c 6b 2e 69 6f |= myIOPa|rmBlk.io|
|000013b0| 56 65 72 73 4e 75 6d 3b | 0d 09 66 50 42 2e 69 6f |VersNum;|..fPB.io|
|000013c0| 46 44 69 72 49 6e 64 65 | 78 20 3d 20 4e 49 4c 3b |FDirInde|x = NIL;|
|000013d0| 0d 09 74 68 65 45 72 72 | 20 3d 20 50 42 47 65 74 |..theErr| = PBGet|
|000013e0| 46 49 6e 66 6f 28 26 66 | 50 42 2c 20 46 41 4c 53 |FInfo(&f|PB, FALS|
|000013f0| 45 29 3b 0d 09 69 66 20 | 28 20 74 68 65 45 72 72 |E);..if |( theErr|
|00001400| 20 21 3d 20 6e 6f 45 72 | 72 20 29 20 7b 0d 09 09 | != noEr|r ) {...|
|00001410| 50 73 74 72 69 6e 67 43 | 6f 70 79 28 28 63 68 61 |PstringC|opy((cha|
|00001420| 72 20 2a 29 74 68 65 4d | 65 73 73 31 2c 20 22 5c |r *)theM|ess1, "\|
|00001430| 70 4f 70 65 6e 53 46 57 | 72 69 74 65 20 45 72 72 |pOpenSFW|rite Err|
|00001440| 6f 72 20 67 65 74 74 69 | 6e 67 20 50 42 47 65 74 |or getti|ng PBGet|
|00001450| 46 49 6e 66 6f 20 77 68 | 69 6c 65 20 6f 70 65 6e |FInfo wh|ile open|
|00001460| 69 6e 67 20 66 69 6c 65 | 3a 22 29 3b 0d 09 09 09 |ing file|:");....|
|00001470| 09 4f 53 45 72 72 6f 72 | 28 74 68 65 4d 65 73 73 |.OSError|(theMess|
|00001480| 31 2c 20 53 6f 75 6e 64 | 46 69 6c 65 4e 61 6d 65 |1, Sound|FileName|
|00001490| 2c 20 74 68 65 45 72 72 | 29 3b 0d 09 09 43 75 72 |, theErr|);...Cur|
|000014a0| 44 69 72 53 74 6f 72 65 | 20 3d 20 53 74 61 72 74 |DirStore| = Start|
|000014b0| 55 70 44 69 72 49 44 3b | 0d 09 09 72 65 74 75 72 |UpDirID;|...retur|
|000014c0| 6e 28 46 41 4c 53 45 29 | 3b 0d 09 7d 0d 09 0d 09 |n(FALSE)|;..}....|
|000014d0| 2f 2a 20 73 65 74 20 63 | 72 65 61 74 6f 72 20 2a |/* set c|reator *|
|000014e0| 2f 0d 09 66 50 42 2e 69 | 6f 46 6c 46 6e 64 72 49 |/..fPB.i|oFlFndrI|
|000014f0| 6e 66 6f 2e 66 64 43 72 | 65 61 74 6f 72 20 3d 20 |nfo.fdCr|eator = |
|00001500| 27 4d 55 34 43 27 3b 0d | 09 73 77 69 74 63 68 28 |'MU4C';.|.switch(|
|00001510| 53 46 6f 75 74 70 75 74 | 54 79 70 65 29 20 7b 0d |SFoutput|Type) {.|
|00001520| 09 09 63 61 73 65 09 49 | 4e 54 31 36 3a 0d 09 09 |..case.I|NT16:...|
|00001530| 09 66 50 42 2e 69 6f 46 | 6c 46 6e 64 72 49 6e 66 |.fPB.ioF|lFndrInf|
|00001540| 6f 2e 66 64 54 79 70 65 | 20 3d 20 27 49 4c 31 36 |o.fdType| = 'IL16|
|00001550| 27 3b 0d 09 09 09 62 72 | 65 61 6b 3b 0d 09 09 63 |';....br|eak;...c|
|00001560| 61 73 65 09 41 49 46 46 | 3a 0d 09 09 09 66 50 42 |ase.AIFF|:....fPB|
|00001570| 2e 69 6f 46 6c 46 6e 64 | 72 49 6e 66 6f 2e 66 64 |.ioFlFnd|rInfo.fd|
|00001580| 54 79 70 65 20 3d 20 27 | 41 49 46 46 27 3b 0d 09 |Type = '|AIFF';..|
|00001590| 09 09 62 72 65 61 6b 3b | 0d 09 09 63 61 73 65 09 |..break;|...case.|
|000015a0| 53 44 3a 0d 09 09 09 66 | 50 42 2e 69 6f 46 6c 46 |SD:....f|PB.ioFlF|
|000015b0| 6e 64 72 49 6e 66 6f 2e | 66 64 54 79 70 65 20 3d |ndrInfo.|fdType =|
|000015c0| 20 27 53 46 49 4c 27 3b | 0d 09 09 09 66 50 42 2e | 'SFIL';|....fPB.|
|000015d0| 69 6f 46 6c 46 6e 64 72 | 49 6e 66 6f 2e 66 64 43 |ioFlFndr|Info.fdC|
|000015e0| 72 65 61 74 6f 72 20 3d | 20 27 58 46 45 52 27 3b |reator =| 'XFER';|
|000015f0| 0d 09 09 09 62 72 65 61 | 6b 3b 0d 09 09 63 61 73 |....brea|k;...cas|
|00001600| 65 09 46 4c 4f 41 54 3a | 0d 09 09 09 66 50 42 2e |e.FLOAT:|....fPB.|
|00001610| 69 6f 46 6c 46 6e 64 72 | 49 6e 66 6f 2e 66 64 54 |ioFlFndr|Info.fdT|
|00001620| 79 70 65 20 3d 20 27 54 | 45 58 54 27 3b 0d 09 09 |ype = 'T|EXT';...|
|00001630| 09 62 72 65 61 6b 3b 0d | 09 7d 0d 0d 09 66 50 42 |.break;.|.}...fPB|
|00001640| 2e 69 6f 46 6c 46 6e 64 | 72 49 6e 66 6f 2e 66 64 |.ioFlFnd|rInfo.fd|
|00001650| 46 6c 61 67 73 20 3d 20 | 4e 49 4c 3b 0d 09 74 68 |Flags = |NIL;..th|
|00001660| 65 45 72 72 20 3d 20 50 | 42 53 65 74 46 49 6e 66 |eErr = P|BSetFInf|
|00001670| 6f 28 26 66 50 42 2c 20 | 46 41 4c 53 45 29 3b 0d |o(&fPB, |FALSE);.|
|00001680| 09 69 66 20 28 20 74 68 | 65 45 72 72 20 21 3d 20 |.if ( th|eErr != |
|00001690| 6e 6f 45 72 72 20 29 20 | 7b 0d 09 09 50 73 74 72 |noErr ) |{...Pstr|
|000016a0| 69 6e 67 43 6f 70 79 28 | 28 63 68 61 72 20 2a 29 |ingCopy(|(char *)|
|000016b0| 74 68 65 4d 65 73 73 31 | 2c 20 22 5c 70 4f 70 65 |theMess1|, "\pOpe|
|000016c0| 6e 53 46 57 72 69 74 65 | 20 45 72 72 6f 72 20 73 |nSFWrite| Error s|
|000016d0| 65 74 74 69 6e 67 20 50 | 42 47 65 74 46 49 6e 66 |etting P|BGetFInf|
|000016e0| 6f 20 77 68 69 6c 65 20 | 6f 70 65 6e 69 6e 67 20 |o while |opening |
|000016f0| 66 69 6c 65 3a 22 29 3b | 0d 09 09 09 09 4f 53 45 |file:");|.....OSE|
|00001700| 72 72 6f 72 28 74 68 65 | 4d 65 73 73 31 2c 20 53 |rror(the|Mess1, S|
|00001710| 6f 75 6e 64 46 69 6c 65 | 4e 61 6d 65 2c 20 74 68 |oundFile|Name, th|
|00001720| 65 45 72 72 29 3b 0d 09 | 09 43 75 72 44 69 72 53 |eErr);..|.CurDirS|
|00001730| 74 6f 72 65 20 3d 20 53 | 74 61 72 74 55 70 44 69 |tore = S|tartUpDi|
|00001740| 72 49 44 3b 0d 09 09 72 | 65 74 75 72 6e 28 46 41 |rID;...r|eturn(FA|
|00001750| 4c 53 45 29 3b 0d 09 7d | 0d 09 50 42 46 6c 75 73 |LSE);..}|..PBFlus|
|00001760| 68 56 6f 6c 28 26 66 50 | 42 2c 20 46 41 4c 53 45 |hVol(&fP|B, FALSE|
|00001770| 29 3b 0d 09 0d 09 2f 2a | 20 6e 6f 77 20 6f 70 65 |);..../*| now ope|
|00001780| 6e 20 69 74 20 2a 2f 0d | 09 6d 79 49 4f 50 61 72 |n it */.|.myIOPar|
|00001790| 6d 42 6c 6b 2e 69 6f 50 | 65 72 6d 73 73 6e 20 3d |mBlk.ioP|ermssn =|
|000017a0| 20 66 73 57 72 50 65 72 | 6d 3b 0d 09 6d 79 49 4f | fsWrPer|m;..myIO|
|000017b0| 50 61 72 6d 42 6c 6b 2e | 69 6f 4d 69 73 63 20 3d |ParmBlk.|ioMisc =|
|000017c0| 20 28 50 74 72 29 4e 49 | 4c 3b 0d 09 69 66 20 28 | (Ptr)NI|L;..if (|
|000017d0| 20 28 74 68 65 45 72 72 | 20 3d 20 50 42 4f 70 65 | (theErr| = PBOpe|
|000017e0| 6e 28 26 6d 79 49 4f 50 | 61 72 6d 42 6c 6b 2c 20 |n(&myIOP|armBlk, |
|000017f0| 46 41 4c 53 45 29 29 20 | 21 3d 20 6e 6f 45 72 72 |FALSE)) |!= noErr|
|00001800| 20 29 20 7b 0d 09 09 50 | 73 74 72 69 6e 67 43 6f | ) {...P|stringCo|
|00001810| 70 79 28 28 63 68 61 72 | 20 2a 29 74 68 65 4d 65 |py((char| *)theMe|
|00001820| 73 73 31 2c 20 22 5c 70 | 4f 70 65 6e 53 46 57 72 |ss1, "\p|OpenSFWr|
|00001830| 69 74 65 20 45 72 72 6f | 72 20 6f 70 65 6e 69 6e |ite Erro|r openin|
|00001840| 67 20 66 69 6c 65 3a 22 | 29 3b 0d 09 09 09 09 4f |g file:"|);.....O|
|00001850| 53 45 72 72 6f 72 28 74 | 68 65 4d 65 73 73 31 2c |SError(t|heMess1,|
|00001860| 20 53 6f 75 6e 64 46 69 | 6c 65 4e 61 6d 65 2c 20 | SoundFi|leName, |
|00001870| 74 68 65 45 72 72 29 3b | 0d 09 09 43 75 72 44 69 |theErr);|...CurDi|
|00001880| 72 53 74 6f 72 65 20 3d | 20 53 74 61 72 74 55 70 |rStore =| StartUp|
|00001890| 44 69 72 49 44 3b 0d 09 | 09 72 65 74 75 72 6e 28 |DirID;..|.return(|
|000018a0| 46 41 4c 53 45 29 3b 0d | 09 7d 0d 09 72 65 74 75 |FALSE);.|.}..retu|
|000018b0| 72 6e 28 54 52 55 45 29 | 3b 0d 7d 0d 0d 42 6f 6f |rn(TRUE)|;.}..Boo|
|000018c0| 6c 65 61 6e 09 43 6c 6f | 73 65 53 46 28 29 0d 7b |lean.Clo|seSF().{|
|000018d0| 0d 09 65 78 74 65 72 6e | 09 09 69 6e 74 09 09 09 |..extern|..int...|
|000018e0| 6e 63 68 6e 6c 73 3b 09 | 09 2f 2a 20 6e 75 6d 62 |nchnls;.|./* numb|
|000018f0| 65 72 20 6f 66 20 6f 75 | 74 70 75 74 20 63 68 61 |er of ou|tput cha|
|00001900| 6e 6e 65 6c 73 20 2a 2f | 0d 09 69 66 20 28 20 28 |nnels */|..if ( (|
|00001910| 74 68 65 45 72 72 20 3d | 20 50 42 43 6c 6f 73 65 |theErr =| PBClose|
|00001920| 28 26 6d 79 49 4f 50 61 | 72 6d 42 6c 6b 2c 20 46 |(&myIOPa|rmBlk, F|
|00001930| 41 4c 53 45 29 29 20 21 | 3d 20 6e 6f 45 72 72 20 |ALSE)) !|= noErr |
|00001940| 29 20 7b 20 0d 09 09 50 | 73 74 72 69 6e 67 43 6f |) { ...P|stringCo|
|00001950| 70 79 28 28 63 68 61 72 | 20 2a 29 74 68 65 4d 65 |py((char| *)theMe|
|00001960| 73 73 31 2c 20 22 5c 70 | 45 72 72 6f 72 20 63 6c |ss1, "\p|Error cl|
|00001970| 6f 73 69 6e 67 20 53 6f | 75 6e 64 20 46 69 6c 65 |osing So|und File|
|00001980| 3a 22 29 3b 0d 09 09 4f | 53 45 72 72 6f 72 28 74 |:");...O|SError(t|
|00001990| 68 65 4d 65 73 73 31 2c | 20 53 6f 75 6e 64 46 69 |heMess1,| SoundFi|
|000019a0| 6c 65 4e 61 6d 65 2c 20 | 74 68 65 45 72 72 29 3b |leName, |theErr);|
|000019b0| 0d 09 09 72 65 74 75 72 | 6e 28 46 41 4c 53 45 29 |...retur|n(FALSE)|
|000019c0| 3b 0d 09 7d 0d 09 0d 09 | 2f 2a 20 69 66 20 53 44 |;..}....|/* if SD|
|000019d0| 32 20 66 69 6c 65 20 66 | 69 78 20 66 69 6c 65 20 |2 file f|ix file |
|000019e0| 74 79 70 65 20 2a 2f 0d | 09 69 66 20 28 20 53 46 |type */.|.if ( SF|
|000019f0| 6f 75 74 70 75 74 54 79 | 70 65 20 3d 3d 20 53 44 |outputTy|pe == SD|
|00001a00| 20 26 26 20 6e 63 68 6e | 6c 73 20 3e 20 31 20 29 | && nchn|ls > 1 )|
|00001a10| 20 7b 0d 09 09 66 50 42 | 2e 69 6f 46 6c 46 6e 64 | {...fPB|.ioFlFnd|
|00001a20| 72 49 6e 66 6f 2e 66 64 | 54 79 70 65 20 3d 20 27 |rInfo.fd|Type = '|
|00001a30| 53 64 32 66 27 3b 0d 09 | 09 66 50 42 2e 69 6f 46 |Sd2f';..|.fPB.ioF|
|00001a40| 6c 46 6e 64 72 49 6e 66 | 6f 2e 66 64 43 72 65 61 |lFndrInf|o.fdCrea|
|00001a50| 74 6f 72 20 3d 20 27 53 | 64 32 61 27 3b 0d 09 09 |tor = 'S|d2a';...|
|00001a60| 66 50 42 2e 69 6f 46 6c | 46 6e 64 72 49 6e 66 6f |fPB.ioFl|FndrInfo|
|00001a70| 2e 66 64 46 6c 61 67 73 | 20 3d 20 4e 49 4c 3b 0d |.fdFlags| = NIL;.|
|00001a80| 09 09 74 68 65 45 72 72 | 20 3d 20 50 42 53 65 74 |..theErr| = PBSet|
|00001a90| 46 49 6e 66 6f 28 26 66 | 50 42 2c 20 46 41 4c 53 |FInfo(&f|PB, FALS|
|00001aa0| 45 29 3b 0d 09 7d 0d 09 | 66 50 42 2e 69 6f 43 6f |E);..}..|fPB.ioCo|
|00001ab0| 6d 70 6c 65 74 69 6f 6e | 20 3d 20 28 50 72 6f 63 |mpletion| = (Proc|
|00001ac0| 50 74 72 29 4e 49 4c 3b | 0d 09 66 50 42 2e 69 6f |Ptr)NIL;|..fPB.io|
|00001ad0| 4e 61 6d 65 50 74 72 20 | 3d 20 6d 79 49 4f 50 61 |NamePtr |= myIOPa|
|00001ae0| 72 6d 42 6c 6b 2e 69 6f | 4e 61 6d 65 50 74 72 3b |rmBlk.io|NamePtr;|
|00001af0| 0d 09 66 50 42 2e 69 6f | 56 52 65 66 4e 75 6d 20 |..fPB.io|VRefNum |
|00001b00| 3d 20 6d 79 49 4f 50 61 | 72 6d 42 6c 6b 2e 69 6f |= myIOPa|rmBlk.io|
|00001b10| 56 52 65 66 4e 75 6d 3b | 0d 09 66 50 42 2e 69 6f |VRefNum;|..fPB.io|
|00001b20| 46 56 65 72 73 4e 75 6d | 20 3d 20 6d 79 49 4f 50 |FVersNum| = myIOP|
|00001b30| 61 72 6d 42 6c 6b 2e 69 | 6f 56 65 72 73 4e 75 6d |armBlk.i|oVersNum|
|00001b40| 3b 0d 09 66 50 42 2e 69 | 6f 46 44 69 72 49 6e 64 |;..fPB.i|oFDirInd|
|00001b50| 65 78 20 3d 20 4e 49 4c | 3b 0d 09 69 66 20 28 20 |ex = NIL|;..if ( |
|00001b60| 28 74 68 65 45 72 72 20 | 3d 20 09 50 42 46 6c 75 |(theErr |= .PBFlu|
|00001b70| 73 68 56 6f 6c 28 26 66 | 50 42 2c 20 46 41 4c 53 |shVol(&f|PB, FALS|
|00001b80| 45 29 29 20 21 3d 20 6e | 6f 45 72 72 20 29 20 7b |E)) != n|oErr ) {|
|00001b90| 20 0d 09 09 50 73 74 72 | 69 6e 67 43 6f 70 79 28 | ...Pstr|ingCopy(|
|00001ba0| 28 63 68 61 72 20 2a 29 | 74 68 65 4d 65 73 73 31 |(char *)|theMess1|
|00001bb0| 2c 20 22 5c 70 45 72 72 | 6f 72 20 72 65 74 75 72 |, "\pErr|or retur|
|00001bc0| 6e 65 64 20 66 72 6f 6d | 20 50 42 46 6c 75 73 68 |ned from| PBFlush|
|00001bd0| 56 6f 6c 20 66 6f 72 20 | 73 61 6d 70 6c 65 20 66 |Vol for |sample f|
|00001be0| 69 6c 65 27 73 20 76 6f | 6c 75 6d 65 3a 22 29 3b |ile's vo|lume:");|
|00001bf0| 0d 09 09 4f 53 45 72 72 | 6f 72 28 74 68 65 4d 65 |...OSErr|or(theMe|
|00001c00| 73 73 31 2c 20 4e 49 4c | 2c 20 74 68 65 45 72 72 |ss1, NIL|, theErr|
|00001c10| 29 3b 0d 09 09 72 65 74 | 75 72 6e 28 46 41 4c 53 |);...ret|urn(FALS|
|00001c20| 45 29 3b 0d 09 7d 0d 09 | 72 65 74 75 72 6e 28 54 |E);..}..|return(T|
|00001c30| 52 55 45 29 3b 0d 7d 0d | 0d 0d 0d 42 6f 6f 6c 65 |RUE);.}.|...Boole|
|00001c40| 61 6e 09 53 65 74 53 46 | 44 69 72 28 44 69 72 4e |an.SetSF|Dir(DirN|
|00001c50| 61 6d 65 2c 20 74 68 65 | 44 69 72 49 44 29 0d 09 |ame, the|DirID)..|
|00001c60| 53 74 72 32 35 35 09 09 | 44 69 72 4e 61 6d 65 3b |Str255..|DirName;|
|00001c70| 0d 09 6c 6f 6e 67 09 09 | 2a 74 68 65 44 69 72 49 |..long..|*theDirI|
|00001c80| 44 3b 0d 7b 0d 09 65 78 | 74 65 72 6e 09 09 69 6e |D;.{..ex|tern..in|
|00001c90| 74 09 09 09 53 46 53 61 | 76 65 56 52 65 66 3b 0d |t...SFSa|veVRef;.|
|00001ca0| 09 65 78 74 65 72 6e 09 | 09 69 6e 74 09 09 09 52 |.extern.|.int...R|
|00001cb0| 65 70 6f 72 74 46 69 6c | 65 52 65 66 4e 75 6d 3b |eportFil|eRefNum;|
|00001cc0| 0d 09 53 74 72 32 35 35 | 09 09 61 53 74 72 69 6e |..Str255|..aStrin|
|00001cd0| 67 3b 0d 09 0d 09 0d 09 | 50 73 74 72 69 6e 67 43 |g;......|PstringC|
|00001ce0| 6f 70 79 28 28 63 68 61 | 72 20 2a 29 61 53 74 72 |opy((cha|r *)aStr|
|00001cf0| 69 6e 67 2c 20 28 63 68 | 61 72 20 2a 29 44 69 72 |ing, (ch|ar *)Dir|
|00001d00| 4e 61 6d 65 29 3b 0d 09 | 6d 79 57 44 50 61 72 61 |Name);..|myWDPara|
|00001d10| 6d 42 6c 6b 2e 69 6f 4e | 61 6d 65 50 74 72 20 3d |mBlk.ioN|amePtr =|
|00001d20| 20 28 53 74 72 69 6e 67 | 50 74 72 29 61 53 74 72 | (String|Ptr)aStr|
|00001d30| 69 6e 67 3b 0d 09 6d 79 | 57 44 50 61 72 61 6d 42 |ing;..my|WDParamB|
|00001d40| 6c 6b 2e 69 6f 43 6f 6d | 70 6c 65 74 69 6f 6e 20 |lk.ioCom|pletion |
|00001d50| 3d 20 4e 49 4c 3b 0d 09 | 6d 79 57 44 50 61 72 61 |= NIL;..|myWDPara|
|00001d60| 6d 42 6c 6b 2e 69 6f 56 | 52 65 66 4e 75 6d 20 3d |mBlk.ioV|RefNum =|
|00001d70| 20 30 3b 0d 09 6d 79 57 | 44 50 61 72 61 6d 42 6c | 0;..myW|DParamBl|
|00001d80| 6b 2e 69 6f 57 44 44 69 | 72 49 44 20 3d 20 4e 49 |k.ioWDDi|rID = NI|
|00001d90| 4c 3b 0d 0d 09 69 66 20 | 28 20 28 74 68 65 45 72 |L;...if |( (theEr|
|00001da0| 72 20 3d 20 50 42 48 53 | 65 74 56 6f 6c 28 26 6d |r = PBHS|etVol(&m|
|00001db0| 79 57 44 50 61 72 61 6d | 42 6c 6b 2c 20 46 41 4c |yWDParam|Blk, FAL|
|00001dc0| 53 45 29 29 20 21 3d 20 | 6e 6f 45 72 72 20 29 20 |SE)) != |noErr ) |
|00001dd0| 7b 0d 09 7d 0d 09 0d 09 | 50 42 48 47 65 74 56 6f |{..}....|PBHGetVo|
|00001de0| 6c 28 26 6d 79 57 44 50 | 61 72 61 6d 42 6c 6b 2c |l(&myWDP|aramBlk,|
|00001df0| 20 46 41 4c 53 45 29 3b | 0d 0d 09 2a 74 68 65 44 | FALSE);|...*theD|
|00001e00| 69 72 49 44 20 3d 20 6d | 79 57 44 50 61 72 61 6d |irID = m|yWDParam|
|00001e10| 42 6c 6b 2e 69 6f 57 44 | 44 69 72 49 44 3b 0d 09 |Blk.ioWD|DirID;..|
|00001e20| 43 75 72 44 69 72 53 74 | 6f 72 65 20 3d 20 2a 74 |CurDirSt|ore = *t|
|00001e30| 68 65 44 69 72 49 44 3b | 0d 09 0d 09 53 46 53 61 |heDirID;|....SFSa|
|00001e40| 76 65 56 52 65 66 20 3d | 20 6d 79 57 44 50 61 72 |veVRef =| myWDPar|
|00001e50| 61 6d 42 6c 6b 2e 69 6f | 56 52 65 66 4e 75 6d 3b |amBlk.io|VRefNum;|
|00001e60| 0d 09 53 46 53 61 76 65 | 44 69 73 6b 20 3d 20 2d |..SFSave|Disk = -|
|00001e70| 31 20 2a 20 53 46 53 61 | 76 65 56 52 65 66 3b 0d |1 * SFSa|veVRef;.|
|00001e80| 09 72 65 74 75 72 6e 28 | 54 52 55 45 29 3b 0d 7d |.return(|TRUE);.}|
|00001e90| 0d 0d 0d 0d 42 6f 6f 6c | 65 61 6e 09 47 65 74 53 |....Bool|ean.GetS|
|00001ea0| 46 44 69 72 28 44 69 72 | 4e 61 6d 65 29 0d 09 53 |FDir(Dir|Name)..S|
|00001eb0| 74 72 32 35 35 09 2a 44 | 69 72 4e 61 6d 65 3b 0d |tr255.*D|irName;.|
|00001ec0| 7b 0d 09 53 74 72 32 35 | 35 09 09 6d 79 53 74 72 |{..Str25|5..myStr|
|00001ed0| 3b 0d 09 57 44 50 42 52 | 65 63 09 09 6d 79 57 44 |;..WDPBR|ec..myWD|
|00001ee0| 50 61 72 61 6d 42 6c 6b | 3b 0d 09 44 69 72 49 6e |ParamBlk|;..DirIn|
|00001ef0| 66 6f 09 09 6d 79 43 61 | 74 49 6e 66 6f 42 6c 6b |fo..myCa|tInfoBlk|
|00001f00| 3b 0d 09 0d 09 6d 79 43 | 61 74 49 6e 66 6f 42 6c |;....myC|atInfoBl|
|00001f10| 6b 2e 69 6f 43 6f 6d 70 | 6c 65 74 69 6f 6e 20 3d |k.ioComp|letion =|
|00001f20| 20 4e 49 4c 3b 0d 09 6d | 79 43 61 74 49 6e 66 6f | NIL;..m|yCatInfo|
|00001f30| 42 6c 6b 2e 69 6f 56 52 | 65 66 4e 75 6d 20 3d 20 |Blk.ioVR|efNum = |
|00001f40| 2d 53 46 53 61 76 65 44 | 69 73 6b 3b 0d 09 6d 79 |-SFSaveD|isk;..my|
|00001f50| 43 61 74 49 6e 66 6f 42 | 6c 6b 2e 69 6f 44 72 44 |CatInfoB|lk.ioDrD|
|00001f60| 69 72 49 44 20 3d 20 43 | 75 72 44 69 72 53 74 6f |irID = C|urDirSto|
|00001f70| 72 65 3b 0d 09 6d 79 43 | 61 74 49 6e 66 6f 42 6c |re;..myC|atInfoBl|
|00001f80| 6b 2e 69 6f 46 44 69 72 | 49 6e 64 65 78 20 3d 20 |k.ioFDir|Index = |
|00001f90| 2d 31 3b 0d 09 6d 79 43 | 61 74 49 6e 66 6f 42 6c |-1;..myC|atInfoBl|
|00001fa0| 6b 2e 69 6f 4e 61 6d 65 | 50 74 72 20 3d 20 28 53 |k.ioName|Ptr = (S|
|00001fb0| 74 72 69 6e 67 50 74 72 | 29 6d 79 53 74 72 3b 0d |tringPtr|)myStr;.|
|00001fc0| 09 69 66 20 28 20 28 74 | 68 65 45 72 72 20 3d 20 |.if ( (t|heErr = |
|00001fd0| 50 42 47 65 74 43 61 74 | 49 6e 66 6f 28 26 6d 79 |PBGetCat|Info(&my|
|00001fe0| 43 61 74 49 6e 66 6f 42 | 6c 6b 2c 20 46 41 4c 53 |CatInfoB|lk, FALS|
|00001ff0| 45 29 29 20 21 3d 20 6e | 6f 45 72 72 20 29 20 7b |E)) != n|oErr ) {|
|00002000| 0d 09 09 50 73 74 72 69 | 6e 67 43 6f 70 79 28 28 |...Pstri|ngCopy((|
|00002010| 63 68 61 72 20 2a 29 74 | 68 65 4d 65 73 73 31 2c |char *)t|heMess1,|
|00002020| 20 22 5c 70 50 42 47 65 | 74 43 61 74 49 6e 66 6f | "\pPBGe|tCatInfo|
|00002030| 20 45 72 72 6f 72 3a 22 | 29 3b 0d 09 09 4f 53 45 | Error:"|);...OSE|
|00002040| 72 72 6f 72 28 74 68 65 | 4d 65 73 73 31 2c 20 6d |rror(the|Mess1, m|
|00002050| 79 43 61 74 49 6e 66 6f | 42 6c 6b 2e 69 6f 4e 61 |yCatInfo|Blk.ioNa|
|00002060| 6d 65 50 74 72 2c 20 74 | 68 65 45 72 72 29 3b 0d |mePtr, t|heErr);.|
|00002070| 09 09 72 65 74 75 72 6e | 28 46 41 4c 53 45 29 3b |..return|(FALSE);|
|00002080| 0d 09 7d 0d 09 0d 09 50 | 73 74 72 69 6e 67 43 6f |..}....P|stringCo|
|00002090| 70 79 28 28 63 68 61 72 | 20 2a 29 44 69 72 4e 61 |py((char| *)DirNa|
|000020a0| 6d 65 2c 20 28 63 68 61 | 72 20 2a 29 6d 79 53 74 |me, (cha|r *)mySt|
|000020b0| 72 29 3b 0d 09 50 73 74 | 72 69 6e 67 43 61 74 28 |r);..Pst|ringCat(|
|000020c0| 28 63 68 61 72 20 2a 29 | 44 69 72 4e 61 6d 65 2c |(char *)|DirName,|
|000020d0| 20 22 5c 70 3a 22 29 3b | 0d 09 0d 09 77 68 69 6c | "\p:");|....whil|
|000020e0| 65 20 28 6d 79 43 61 74 | 49 6e 66 6f 42 6c 6b 2e |e (myCat|InfoBlk.|
|000020f0| 69 6f 44 72 44 69 72 49 | 44 20 21 3d 20 32 20 29 |ioDrDirI|D != 2 )|
|00002100| 20 7b 0d 09 09 6d 79 43 | 61 74 49 6e 66 6f 42 6c | {...myC|atInfoBl|
|00002110| 6b 2e 69 6f 44 72 44 69 | 72 49 44 20 3d 20 6d 79 |k.ioDrDi|rID = my|
|00002120| 43 61 74 49 6e 66 6f 42 | 6c 6b 2e 69 6f 44 72 50 |CatInfoB|lk.ioDrP|
|00002130| 61 72 49 44 3b 0d 09 09 | 69 66 20 28 20 28 74 68 |arID;...|if ( (th|
|00002140| 65 45 72 72 20 3d 20 50 | 42 47 65 74 43 61 74 49 |eErr = P|BGetCatI|
|00002150| 6e 66 6f 28 26 6d 79 43 | 61 74 49 6e 66 6f 42 6c |nfo(&myC|atInfoBl|
|00002160| 6b 2c 20 46 41 4c 53 45 | 29 29 20 21 3d 20 6e 6f |k, FALSE|)) != no|
|00002170| 45 72 72 20 29 20 7b 0d | 09 09 09 50 73 74 72 69 |Err ) {.|...Pstri|
|00002180| 6e 67 43 6f 70 79 28 28 | 63 68 61 72 20 2a 29 74 |ngCopy((|char *)t|
|00002190| 68 65 4d 65 73 73 31 2c | 20 22 5c 70 50 42 47 65 |heMess1,| "\pPBGe|
|000021a0| 74 43 61 74 49 6e 66 6f | 20 65 72 72 6f 72 3a 22 |tCatInfo| error:"|
|000021b0| 29 3b 0d 09 09 09 4f 53 | 45 72 72 6f 72 28 74 68 |);....OS|Error(th|
|000021c0| 65 4d 65 73 73 31 2c 20 | 6d 79 43 61 74 49 6e 66 |eMess1, |myCatInf|
|000021d0| 6f 42 6c 6b 2e 69 6f 4e | 61 6d 65 50 74 72 2c 20 |oBlk.ioN|amePtr, |
|000021e0| 74 68 65 45 72 72 29 3b | 0d 09 09 09 72 65 74 75 |theErr);|....retu|
|000021f0| 72 6e 28 46 41 4c 53 45 | 29 3b 0d 09 09 7d 0d 09 |rn(FALSE|);...}..|
|00002200| 09 50 73 74 72 69 6e 67 | 43 61 74 28 28 63 68 61 |.Pstring|Cat((cha|
|00002210| 72 20 2a 29 6d 79 53 74 | 72 2c 20 22 5c 70 3a 22 |r *)mySt|r, "\p:"|
|00002220| 29 3b 0d 09 09 50 73 74 | 72 69 6e 67 43 61 74 28 |);...Pst|ringCat(|
|00002230| 28 63 68 61 72 20 2a 29 | 6d 79 53 74 72 2c 20 28 |(char *)|myStr, (|
|00002240| 63 68 61 72 20 2a 29 44 | 69 72 4e 61 6d 65 29 3b |char *)D|irName);|
|00002250| 0d 09 09 50 73 74 72 69 | 6e 67 43 6f 70 79 28 28 |...Pstri|ngCopy((|
|00002260| 63 68 61 72 20 2a 29 44 | 69 72 4e 61 6d 65 2c 20 |char *)D|irName, |
|00002270| 28 63 68 61 72 20 2a 29 | 6d 79 53 74 72 29 3b 0d |(char *)|myStr);.|
|00002280| 09 7d 0d 09 43 75 72 44 | 69 72 53 74 6f 72 65 20 |.}..CurD|irStore |
|00002290| 3d 20 6d 79 43 61 74 49 | 6e 66 6f 42 6c 6b 2e 69 |= myCatI|nfoBlk.i|
|000022a0| 6f 44 72 44 69 72 49 44 | 3b 0d 09 0d 09 72 65 74 |oDrDirID|;....ret|
|000022b0| 75 72 6e 28 54 52 55 45 | 29 3b 0d 7d 0d 0d 0d 0d |urn(TRUE|);.}....|
|000022c0| 42 6f 6f 6c 65 61 6e 09 | 4f 70 65 6e 53 63 6f 72 |Boolean.|OpenScor|
|000022d0| 65 46 69 6c 65 28 29 0d | 7b 0d 09 53 46 54 79 70 |eFile().|{..SFTyp|
|000022e0| 65 4c 69 73 74 09 74 79 | 70 65 73 3b 0d 09 50 6f |eList.ty|pes;..Po|
|000022f0| 69 6e 74 09 77 68 65 72 | 65 3b 0d 09 65 78 74 65 |int.wher|e;..exte|
|00002300| 72 6e 09 53 74 72 32 35 | 35 09 53 63 6f 72 65 44 |rn.Str25|5.ScoreD|
|00002310| 69 72 65 63 74 6f 72 79 | 4e 61 6d 65 3b 0d 09 65 |irectory|Name;..e|
|00002320| 78 74 65 72 6e 09 53 74 | 72 32 35 35 09 73 66 69 |xtern.St|r255.sfi|
|00002330| 6c 65 3b 0d 09 53 74 72 | 32 35 35 09 74 61 69 6c |le;..Str|255.tail|
|00002340| 3b 0d 09 73 68 6f 72 74 | 09 76 6f 6c 75 6d 65 3b |;..short|.volume;|
|00002350| 0d 09 6c 6f 6e 67 09 64 | 69 72 49 44 3b 0d 09 65 |..long.d|irID;..e|
|00002360| 78 74 65 72 6e 09 53 74 | 72 32 35 35 09 53 74 61 |xtern.St|r255.Sta|
|00002370| 72 74 44 69 72 4e 61 6d | 65 3b 0d 09 65 78 74 65 |rtDirNam|e;..exte|
|00002380| 72 6e 09 69 6e 74 09 09 | 73 63 6f 72 65 52 65 66 |rn.int..|scoreRef|
|00002390| 4e 75 6d 3b 0d 09 0d 09 | 0d 09 53 65 74 50 74 28 |Num;....|..SetPt(|
|000023a0| 26 77 68 65 72 65 2c 20 | 31 30 30 2c 20 31 30 30 |&where, |100, 100|
|000023b0| 29 3b 0d 09 53 46 47 65 | 74 46 69 6c 65 28 77 68 |);..SFGe|tFile(wh|
|000023c0| 65 72 65 2c 20 4e 49 4c | 2c 20 4e 49 4c 2c 20 2d |ere, NIL|, NIL, -|
|000023d0| 31 2c 20 4e 49 4c 2c 20 | 4e 49 4c 2c 20 26 53 63 |1, NIL, |NIL, &Sc|
|000023e0| 6f 72 65 46 69 6c 65 52 | 65 70 6c 79 29 3b 0d 09 |oreFileR|eply);..|
|000023f0| 69 66 28 21 53 63 6f 72 | 65 46 69 6c 65 52 65 70 |if(!Scor|eFileRep|
|00002400| 6c 79 2e 67 6f 6f 64 29 | 0d 09 09 72 65 74 75 72 |ly.good)|...retur|
|00002410| 6e 28 46 41 4c 53 45 29 | 3b 0d 0d 2f 2a 20 67 65 |n(FALSE)|;../* ge|
|00002420| 74 20 74 68 65 20 6e 61 | 6d 65 20 6f 66 20 74 68 |t the na|me of th|
|00002430| 65 20 73 63 6f 72 65 20 | 66 6f 6c 64 65 72 20 6e |e score |folder n|
|00002440| 61 6d 65 20 2a 2f 0d 09 | 53 74 61 72 74 44 69 72 |ame */..|StartDir|
|00002450| 4e 61 6d 65 5b 30 5d 20 | 3d 20 30 3b 0d 09 74 61 |Name[0] |= 0;..ta|
|00002460| 69 6c 5b 30 5d 20 3d 20 | 30 3b 0d 09 76 6f 6c 75 |il[0] = |0;..volu|
|00002470| 6d 65 20 3d 20 30 3b 0d | 09 64 69 72 49 44 20 3d |me = 0;.|.dirID =|
|00002480| 20 4e 49 4c 3b 0d 09 46 | 75 6c 6c 46 69 6c 65 4e | NIL;..F|ullFileN|
|00002490| 61 6d 65 28 53 74 61 72 | 74 44 69 72 4e 61 6d 65 |ame(Star|tDirName|
|000024a0| 2c 20 74 61 69 6c 2c 20 | 76 6f 6c 75 6d 65 2c 20 |, tail, |volume, |
|000024b0| 64 69 72 49 44 29 3b 0d | 0d 09 73 63 6f 72 65 52 |dirID);.|..scoreR|
|000024c0| 65 66 4e 75 6d 20 3d 20 | 30 3b 0d 09 50 73 74 72 |efNum = |0;..Pstr|
|000024d0| 69 6e 67 43 6f 70 79 28 | 28 63 68 61 72 20 2a 29 |ingCopy(|(char *)|
|000024e0| 73 66 69 6c 65 2c 20 28 | 63 68 61 72 20 2a 29 53 |sfile, (|char *)S|
|000024f0| 63 6f 72 65 46 69 6c 65 | 52 65 70 6c 79 2e 66 4e |coreFile|Reply.fN|
|00002500| 61 6d 65 29 3b 0d 09 74 | 68 65 45 72 72 20 3d 20 |ame);..t|heErr = |
|00002510| 46 53 4f 70 65 6e 28 73 | 66 69 6c 65 2c 20 53 63 |FSOpen(s|file, Sc|
|00002520| 6f 72 65 46 69 6c 65 52 | 65 70 6c 79 2e 76 52 65 |oreFileR|eply.vRe|
|00002530| 66 4e 75 6d 2c 20 26 73 | 63 6f 72 65 52 65 66 4e |fNum, &s|coreRefN|
|00002540| 75 6d 29 3b 0d 09 69 66 | 20 28 74 68 65 45 72 72 |um);..if| (theErr|
|00002550| 20 21 3d 20 6e 6f 45 72 | 72 29 20 7b 0d 09 09 50 | != noEr|r) {...P|
|00002560| 73 74 72 69 6e 67 43 6f | 70 79 28 28 63 68 61 72 |stringCo|py((char|
|00002570| 20 2a 29 74 68 65 4d 65 | 73 73 31 2c 20 22 5c 70 | *)theMe|ss1, "\p|
|00002580| 45 72 72 6f 72 20 6f 70 | 65 6e 69 6e 67 20 73 63 |Error op|ening sc|
|00002590| 6f 72 65 20 66 69 6c 65 | 3a 22 29 3b 0d 09 09 4f |ore file|:");...O|
|000025a0| 53 45 72 72 6f 72 28 74 | 68 65 4d 65 73 73 31 2c |SError(t|heMess1,|
|000025b0| 20 53 63 6f 72 65 46 69 | 6c 65 52 65 70 6c 79 2e | ScoreFi|leReply.|
|000025c0| 66 4e 61 6d 65 2c 20 74 | 68 65 45 72 72 29 3b 0d |fName, t|heErr);.|
|000025d0| 09 09 72 65 74 75 72 6e | 28 46 41 4c 53 45 29 3b |..return|(FALSE);|
|000025e0| 0d 09 7d 0d 09 72 65 74 | 75 72 6e 28 54 52 55 45 |..}..ret|urn(TRUE|
|000025f0| 29 3b 0d 7d 0d 0d 0d 76 | 6f 69 64 09 43 6c 65 61 |);.}...v|oid.Clea|
|00002600| 6e 55 70 28 65 72 72 46 | 6c 61 67 29 0d 09 42 6f |nUp(errF|lag)..Bo|
|00002610| 6f 6c 65 61 6e 09 65 72 | 72 46 6c 61 67 3b 0d 7b |olean.er|rFlag;.{|
|00002620| 0d 09 65 78 74 65 72 6e | 09 09 69 6e 74 09 72 66 |..extern|..int.rf|
|00002630| 69 6c 65 76 52 65 66 4e | 75 6d 3b 0d 09 65 78 74 |ilevRefN|um;..ext|
|00002640| 65 72 6e 09 09 53 74 72 | 32 35 35 09 72 66 69 6c |ern..Str|255.rfil|
|00002650| 65 3b 0d 09 65 78 74 65 | 72 6e 09 42 6f 6f 6c 65 |e;..exte|rn.Boole|
|00002660| 61 6e 09 09 43 72 65 61 | 74 65 53 6f 75 6e 64 46 |an..Crea|teSoundF|
|00002670| 69 6c 65 3b 0d 09 65 78 | 74 65 72 6e 09 53 74 72 |ile;..ex|tern.Str|
|00002680| 32 35 35 09 09 70 32 74 | 6d 70 3b 0d 09 69 6e 74 |255..p2t|mp;..int|
|00002690| 20 69 3b 0d 0d 09 69 66 | 20 28 20 53 63 6f 72 65 | i;...if| ( Score|
|000026a0| 46 69 6c 65 49 73 4f 70 | 65 6e 20 29 20 7b 0d 09 |FileIsOp|en ) {..|
|000026b0| 09 74 68 65 45 72 72 20 | 3d 20 46 53 43 6c 6f 73 |.theErr |= FSClos|
|000026c0| 65 28 73 63 6f 72 65 52 | 65 66 4e 75 6d 29 3b 0d |e(scoreR|efNum);.|
|000026d0| 09 09 53 63 6f 72 65 46 | 69 6c 65 49 73 4f 70 65 |..ScoreF|ileIsOpe|
|000026e0| 6e 20 3d 20 46 41 4c 53 | 45 3b 0d 09 7d 0d 09 69 |n = FALS|E;..}..i|
|000026f0| 66 20 28 20 52 65 70 6f | 72 74 46 69 6c 65 49 73 |f ( Repo|rtFileIs|
|00002700| 4f 70 65 6e 20 29 20 7b | 0d 09 09 74 68 65 45 72 |Open ) {|...theEr|
|00002710| 72 20 3d 20 46 53 43 6c | 6f 73 65 28 52 65 70 6f |r = FSCl|ose(Repo|
|00002720| 72 74 46 69 6c 65 52 65 | 66 4e 75 6d 29 3b 0d 09 |rtFileRe|fNum);..|
|00002730| 09 69 66 20 28 65 72 72 | 46 6c 61 67 29 0d 09 09 |.if (err|Flag)...|
|00002740| 09 74 68 65 45 72 72 20 | 3d 20 46 53 44 65 6c 65 |.theErr |= FSDele|
|00002750| 74 65 28 72 66 69 6c 65 | 2c 20 72 66 69 6c 65 76 |te(rfile|, rfilev|
|00002760| 52 65 66 4e 75 6d 29 3b | 0d 09 09 52 65 70 6f 72 |RefNum);|...Repor|
|00002770| 74 46 69 6c 65 49 73 4f | 70 65 6e 20 3d 20 46 41 |tFileIsO|pen = FA|
|00002780| 4c 53 45 3b 0d 09 7d 0d | 09 69 66 20 28 20 53 6f |LSE;..}.|.if ( So|
|00002790| 75 6e 64 46 69 6c 65 49 | 73 4f 70 65 6e 20 29 20 |undFileI|sOpen ) |
|000027a0| 7b 0d 09 09 69 66 20 28 | 21 65 72 72 46 6c 61 67 |{...if (|!errFlag|
|000027b0| 29 09 2f 2a 20 64 6f 6e | 27 74 20 75 70 64 61 74 |)./* don|'t updat|
|000027c0| 65 20 72 65 73 6f 75 72 | 63 65 20 69 66 20 77 65 |e resour|ce if we|
|000027d0| 20 63 61 6e 63 65 6c 6c | 65 64 20 6f 75 74 20 2a | cancell|ed out *|
|000027e0| 2f 0d 09 09 09 75 70 64 | 61 74 65 53 46 52 65 73 |/....upd|ateSFRes|
|000027f0| 46 69 6c 65 28 29 3b 20 | 0d 09 09 74 68 65 45 72 |File(); |...theEr|
|00002800| 72 20 3d 20 50 42 43 6c | 6f 73 65 28 26 6d 79 49 |r = PBCl|ose(&myI|
|00002810| 4f 50 61 72 6d 42 6c 6b | 2c 20 46 41 4c 53 45 29 |OParmBlk|, FALSE)|
|00002820| 3b 0d 09 09 53 6f 75 6e | 64 46 69 6c 65 49 73 4f |;...Soun|dFileIsO|
|00002830| 70 65 6e 20 3d 20 46 41 | 4c 53 45 3b 0d 09 09 69 |pen = FA|LSE;...i|
|00002840| 66 20 28 65 72 72 46 6c | 61 67 29 0d 09 09 09 74 |f (errFl|ag)....t|
|00002850| 68 65 45 72 72 20 3d 20 | 50 42 44 65 6c 65 74 65 |heErr = |PBDelete|
|00002860| 28 26 6d 79 49 4f 50 61 | 72 6d 42 6c 6b 2c 20 46 |(&myIOPa|rmBlk, F|
|00002870| 41 4c 53 45 29 3b 0d 09 | 7d 0d 09 46 69 78 55 70 |ALSE);..|}..FixUp|
|00002880| 28 29 3b 09 2f 2a 20 72 | 65 73 65 74 73 20 73 74 |();./* r|esets st|
|00002890| 61 72 74 75 70 20 64 69 | 72 65 63 74 6f 72 79 20 |artup di|rectory |
|000028a0| 2a 2f 0d 7d 0d 0d 0d 0d | 74 79 70 65 64 65 66 09 |*/.}....|typedef.|
|000028b0| 73 74 72 75 63 74 20 7b | 0d 09 69 6e 74 09 09 6e |struct {|..int..n|
|000028c0| 73 74 72 69 6e 67 73 3b | 0d 09 75 6e 73 69 67 6e |strings;|..unsign|
|000028d0| 65 64 09 63 68 61 72 09 | 09 74 68 65 53 74 72 69 |ed.char.|.theStri|
|000028e0| 6e 67 73 5b 32 35 36 5d | 3b 0d 7d 20 52 65 73 44 |ngs[256]|;.} ResD|
|000028f0| 61 74 75 6d 3b 0d 0d 42 | 6f 6f 6c 65 61 6e 09 75 |atum;..B|oolean.u|
|00002900| 70 64 61 74 65 53 46 52 | 65 73 46 69 6c 65 28 29 |pdateSFR|esFile()|
|00002910| 0d 7b 09 0d 09 52 65 73 | 44 61 74 75 6d 09 09 09 |.{...Res|Datum...|
|00002920| 2a 2a 6e 65 77 53 66 52 | 65 73 3b 0d 09 75 6e 73 |**newSfR|es;..uns|
|00002930| 69 67 6e 65 64 09 63 68 | 61 72 09 09 2a 73 74 72 |igned.ch|ar..*str|
|00002940| 70 74 72 3b 0d 09 53 74 | 72 32 35 35 09 09 09 6d |ptr;..St|r255...m|
|00002950| 79 53 74 72 69 6e 67 3b | 0d 09 53 74 72 69 6e 67 |yString;|..String|
|00002960| 48 61 6e 64 6c 65 09 6d | 79 53 74 72 69 6e 67 48 |Handle.m|yStringH|
|00002970| 61 6e 64 6c 65 31 2c 20 | 6d 79 53 74 72 69 6e 67 |andle1, |myString|
|00002980| 48 61 6e 64 6c 65 32 2c | 20 6d 79 53 74 72 69 6e |Handle2,| myStrin|
|00002990| 67 48 61 6e 64 6c 65 33 | 3b 0d 09 6c 6f 6e 67 09 |gHandle3|;..long.|
|000029a0| 09 09 53 61 6d 70 6c 65 | 52 61 74 65 3b 0d 09 65 |..Sample|Rate;..e|
|000029b0| 78 74 65 72 6e 09 09 09 | 69 6e 74 09 09 09 09 41 |xtern...|int....A|
|000029c0| 70 70 52 65 73 46 69 6c | 65 3b 0d 09 65 78 74 65 |ppResFil|e;..exte|
|000029d0| 72 6e 09 09 09 69 6e 74 | 09 09 09 6e 63 68 6e 6c |rn...int|...nchnl|
|000029e0| 73 3b 09 09 2f 2a 20 6e | 75 6d 62 65 72 20 6f 66 |s;../* n|umber of|
|000029f0| 20 6f 75 74 70 75 74 20 | 63 68 61 6e 6e 65 6c 73 | output |channels|
|00002a00| 20 2a 2f 0d 09 65 78 74 | 65 72 6e 09 09 09 64 6f | */..ext|ern...do|
|00002a10| 75 62 6c 65 09 09 73 72 | 61 74 65 3b 09 09 2f 2a |uble..sr|ate;../*|
|00002a20| 20 73 61 6d 70 6c 69 6e | 67 20 72 61 74 65 20 2a | samplin|g rate *|
|00002a30| 2f 0d 09 65 78 74 65 72 | 6e 09 09 09 66 6c 6f 61 |/..exter|n...floa|
|00002a40| 74 09 09 09 4d 61 78 53 | 61 6d 70 6c 65 3b 0d 09 |t...MaxS|ample;..|
|00002a50| 65 78 74 65 72 6e 09 09 | 09 66 6c 6f 61 74 09 09 |extern..|.float..|
|00002a60| 09 4d 69 6e 53 61 6d 70 | 6c 65 3b 0d 09 65 78 74 |.MinSamp|le;..ext|
|00002a70| 65 72 6e 09 09 09 69 6e | 74 09 09 09 53 46 6f 75 |ern...in|t...SFou|
|00002a80| 74 70 75 74 54 79 70 65 | 3b 0d 09 69 6e 74 09 69 |tputType|;..int.i|
|00002a90| 3b 0d 09 0d 09 0d 09 0d | 09 53 61 6d 70 6c 65 52 |;.......|.SampleR|
|00002aa0| 61 74 65 20 3d 20 28 6c | 6f 6e 67 29 73 72 61 74 |ate = (l|ong)srat|
|00002ab0| 65 3b 0d 09 43 75 72 44 | 69 72 53 74 6f 72 65 20 |e;..CurD|irStore |
|00002ac0| 3d 20 53 6f 75 6e 64 46 | 69 6c 65 44 69 72 49 44 |= SoundF|ileDirID|
|00002ad0| 3b 0d 0d 09 6d 79 57 44 | 50 61 72 61 6d 42 6c 6b |;...myWD|ParamBlk|
|00002ae0| 2e 69 6f 43 6f 6d 70 6c | 65 74 69 6f 6e 20 3d 20 |.ioCompl|etion = |
|00002af0| 4e 49 4c 3b 0d 09 6d 79 | 57 44 50 61 72 61 6d 42 |NIL;..my|WDParamB|
|00002b00| 6c 6b 2e 69 6f 4e 61 6d | 65 50 74 72 20 3d 20 4e |lk.ioNam|ePtr = N|
|00002b10| 49 4c 3b 0d 0d 09 69 66 | 20 28 20 28 74 68 65 45 |IL;...if| ( (theE|
|00002b20| 72 72 20 3d 20 50 42 4f | 70 65 6e 57 44 28 26 6d |rr = PBO|penWD(&m|
|00002b30| 79 57 44 50 61 72 61 6d | 42 6c 6b 2c 20 46 41 4c |yWDParam|Blk, FAL|
|00002b40| 53 45 29 29 20 21 3d 20 | 6e 6f 45 72 72 20 29 20 |SE)) != |noErr ) |
|00002b50| 7b 0d 09 09 50 73 74 72 | 69 6e 67 43 6f 70 79 28 |{...Pstr|ingCopy(|
|00002b60| 28 63 68 61 72 20 2a 29 | 74 68 65 4d 65 73 73 31 |(char *)|theMess1|
|00002b70| 2c 20 22 5c 70 55 70 64 | 61 74 65 52 65 73 46 69 |, "\pUpd|ateResFi|
|00002b80| 6c 65 20 2d 20 50 42 4f | 70 65 6e 57 44 20 65 72 |le - PBO|penWD er|
|00002b90| 72 6f 72 3a 22 29 3b 0d | 09 09 4f 53 45 72 72 6f |ror:");.|..OSErro|
|00002ba0| 72 28 74 68 65 4d 65 73 | 73 31 2c 20 6d 79 57 44 |r(theMes|s1, myWD|
|00002bb0| 50 61 72 61 6d 42 6c 6b | 2e 69 6f 4e 61 6d 65 50 |ParamBlk|.ioNameP|
|00002bc0| 74 72 2c 20 74 68 65 45 | 72 72 29 3b 0d 09 09 72 |tr, theE|rr);...r|
|00002bd0| 65 74 75 72 6e 28 46 41 | 4c 53 45 29 3b 0d 09 7d |eturn(FA|LSE);..}|
|00002be0| 0d 09 0d 09 2f 2a 20 6f | 70 65 6e 20 74 68 65 20 |..../* o|pen the |
|00002bf0| 72 65 73 6f 75 72 63 65 | 20 66 6f 72 6b 20 2a 2f |resource| fork */|
|00002c00| 0d 09 43 72 65 61 74 65 | 52 65 73 46 69 6c 65 28 |..Create|ResFile(|
|00002c10| 53 6f 75 6e 64 46 69 6c | 65 4e 61 6d 65 29 3b 0d |SoundFil|eName);.|
|00002c20| 09 69 66 20 28 20 28 20 | 74 68 65 45 72 72 20 3d |.if ( ( |theErr =|
|00002c30| 20 52 65 73 45 72 72 6f | 72 28 29 29 20 21 3d 20 | ResErro|r()) != |
|00002c40| 6e 6f 45 72 72 20 29 20 | 7b 0d 09 09 50 73 74 72 |noErr ) |{...Pstr|
|00002c50| 69 6e 67 43 6f 70 79 28 | 28 63 68 61 72 20 2a 29 |ingCopy(|(char *)|
|00002c60| 74 68 65 4d 65 73 73 31 | 2c 20 22 5c 70 75 70 64 |theMess1|, "\pupd|
|00002c70| 61 74 65 53 46 52 65 73 | 46 69 6c 65 20 43 72 65 |ateSFRes|File Cre|
|00002c80| 61 74 65 52 65 73 46 69 | 6c 65 20 65 72 72 6f 72 |ateResFi|le error|
|00002c90| 3a 22 29 3b 0d 09 09 09 | 4f 53 45 72 72 6f 72 28 |:");....|OSError(|
|00002ca0| 74 68 65 4d 65 73 73 31 | 2c 20 53 6f 75 6e 64 46 |theMess1|, SoundF|
|00002cb0| 69 6c 65 4e 61 6d 65 2c | 20 74 68 65 45 72 72 29 |ileName,| theErr)|
|00002cc0| 3b 0d 09 09 74 68 65 45 | 72 72 20 3d 20 50 42 43 |;...theE|rr = PBC|
|00002cd0| 6c 6f 73 65 57 44 28 26 | 6d 79 57 44 50 61 72 61 |loseWD(&|myWDPara|
|00002ce0| 6d 42 6c 6b 2c 20 46 41 | 4c 53 45 29 3b 0d 09 09 |mBlk, FA|LSE);...|
|00002cf0| 43 75 72 44 69 72 53 74 | 6f 72 65 20 3d 20 53 74 |CurDirSt|ore = St|
|00002d00| 61 72 74 55 70 44 69 72 | 49 44 3b 0d 2f 2a 09 09 |artUpDir|ID;./*..|
|00002d10| 09 72 65 74 75 72 6e 28 | 46 41 4c 53 45 29 3b 2a |.return(|FALSE);*|
|00002d20| 2f 0d 09 7d 0d 09 09 0d | 09 73 66 52 65 73 46 69 |/..}....|.sfResFi|
|00002d30| 6c 65 52 65 66 4e 75 6d | 20 3d 20 4f 70 65 6e 52 |leRefNum| = OpenR|
|00002d40| 65 73 46 69 6c 65 28 53 | 6f 75 6e 64 46 69 6c 65 |esFile(S|oundFile|
|00002d50| 4e 61 6d 65 29 3b 0d 09 | 69 66 20 28 20 28 20 74 |Name);..|if ( ( t|
|00002d60| 68 65 45 72 72 20 3d 20 | 52 65 73 45 72 72 6f 72 |heErr = |ResError|
|00002d70| 28 29 29 20 21 3d 20 6e | 6f 45 72 72 20 29 20 7b |()) != n|oErr ) {|
|00002d80| 0d 09 09 50 73 74 72 69 | 6e 67 43 6f 70 79 28 28 |...Pstri|ngCopy((|
|00002d90| 63 68 61 72 20 2a 29 74 | 68 65 4d 65 73 73 31 2c |char *)t|heMess1,|
|00002da0| 20 22 5c 70 75 70 64 61 | 74 65 53 46 52 65 73 46 | "\pupda|teSFResF|
|00002db0| 69 6c 65 3a 20 4f 70 65 | 6e 52 65 73 46 69 6c 65 |ile: Ope|nResFile|
|00002dc0| 20 65 72 72 6f 72 3a 22 | 29 3b 0d 09 09 4f 53 45 | error:"|);...OSE|
|00002dd0| 72 72 6f 72 28 74 68 65 | 4d 65 73 73 31 2c 20 53 |rror(the|Mess1, S|
|00002de0| 6f 75 6e 64 46 69 6c 65 | 4e 61 6d 65 2c 20 74 68 |oundFile|Name, th|
|00002df0| 65 45 72 72 29 3b 0d 09 | 09 74 68 65 45 72 72 20 |eErr);..|.theErr |
|00002e00| 3d 20 50 42 43 6c 6f 73 | 65 57 44 28 26 6d 79 57 |= PBClos|eWD(&myW|
|00002e10| 44 50 61 72 61 6d 42 6c | 6b 2c 20 46 41 4c 53 45 |DParamBl|k, FALSE|
|00002e20| 29 3b 0d 09 09 43 75 72 | 44 69 72 53 74 6f 72 65 |);...Cur|DirStore|
|00002e30| 20 3d 20 53 74 61 72 74 | 55 70 44 69 72 49 44 3b | = Start|UpDirID;|
|00002e40| 0d 09 09 72 65 74 75 72 | 6e 28 46 41 4c 53 45 29 |...retur|n(FALSE)|
|00002e50| 3b 0d 09 7d 0d 0d 09 6e | 65 77 53 66 52 65 73 20 |;..}...n|ewSfRes |
|00002e60| 3d 20 28 52 65 73 44 61 | 74 75 6d 20 2a 2a 29 20 |= (ResDa|tum **) |
|00002e70| 4e 65 77 48 61 6e 64 6c | 65 28 28 6c 6f 6e 67 29 |NewHandl|e((long)|
|00002e80| 73 69 7a 65 6f 66 28 52 | 65 73 44 61 74 75 6d 29 |sizeof(R|esDatum)|
|00002e90| 29 3b 0d 09 48 4c 6f 63 | 6b 28 6e 65 77 53 66 52 |);..HLoc|k(newSfR|
|00002ea0| 65 73 29 3b 0d 09 0d 09 | 28 2a 2a 6e 65 77 53 66 |es);....|(**newSf|
|00002eb0| 52 65 73 29 2e 6e 73 74 | 72 69 6e 67 73 20 3d 20 |Res).nst|rings = |
|00002ec0| 35 3b 0d 0d 09 73 74 72 | 70 74 72 20 3d 20 26 28 |5;...str|ptr = &(|
|00002ed0| 28 2a 6e 65 77 53 66 52 | 65 73 29 2d 3e 74 68 65 |(*newSfR|es)->the|
|00002ee0| 53 74 72 69 6e 67 73 5b | 30 5d 29 3b 0d 09 0d 09 |Strings[|0]);....|
|00002ef0| 73 77 69 74 63 68 28 53 | 46 6f 75 74 70 75 74 54 |switch(S|FoutputT|
|00002f00| 79 70 65 29 20 7b 0d 09 | 09 63 61 73 65 09 49 4e |ype) {..|.case.IN|
|00002f10| 54 31 36 3a 0d 09 09 09 | 50 73 74 72 69 6e 67 43 |T16:....|PstringC|
|00002f20| 6f 70 79 28 28 63 68 61 | 72 20 2a 29 73 74 72 70 |opy((cha|r *)strp|
|00002f30| 74 72 2c 20 22 5c 70 49 | 4e 54 31 36 22 29 3b 0d |tr, "\pI|NT16");.|
|00002f40| 09 09 09 73 74 72 70 74 | 72 20 2b 3d 20 28 2a 73 |...strpt|r += (*s|
|00002f50| 74 72 70 74 72 29 20 2b | 20 31 3b 0d 09 09 09 62 |trptr) +| 1;....b|
|00002f60| 72 65 61 6b 3b 0d 09 09 | 63 61 73 65 09 41 49 46 |reak;...|case.AIF|
|00002f70| 46 3a 0d 09 09 09 50 73 | 74 72 69 6e 67 43 6f 70 |F:....Ps|tringCop|
|00002f80| 79 28 28 63 68 61 72 20 | 2a 29 73 74 72 70 74 72 |y((char |*)strptr|
|00002f90| 2c 20 22 5c 70 41 49 46 | 46 22 29 3b 0d 09 09 09 |, "\pAIF|F");....|
|00002fa0| 73 74 72 70 74 72 20 2b | 3d 20 28 2a 73 74 72 70 |strptr +|= (*strp|
|00002fb0| 74 72 29 20 2b 20 31 3b | 0d 09 09 09 62 72 65 61 |tr) + 1;|....brea|
|00002fc0| 6b 3b 0d 09 09 63 61 73 | 65 09 53 44 3a 0d 09 09 |k;...cas|e.SD:...|
|00002fd0| 09 69 66 20 28 6e 63 68 | 6e 6c 73 20 3e 20 31 20 |.if (nch|nls > 1 |
|00002fe0| 29 20 7b 0d 09 09 09 09 | 50 73 74 72 69 6e 67 43 |) {.....|PstringC|
|00002ff0| 6f 70 79 28 28 63 68 61 | 72 20 2a 29 73 74 72 70 |opy((cha|r *)strp|
|00003000| 74 72 2c 20 22 5c 70 53 | 44 32 22 29 3b 0d 09 09 |tr, "\pS|D2");...|
|00003010| 09 09 64 6f 53 44 32 52 | 65 73 6f 75 72 63 65 73 |..doSD2R|esources|
|00003020| 28 29 3b 0d 09 09 09 7d | 0d 09 09 09 65 6c 73 65 |();....}|....else|
|00003030| 0d 09 09 09 09 50 73 74 | 72 69 6e 67 43 6f 70 79 |.....Pst|ringCopy|
|00003040| 28 28 63 68 61 72 20 2a | 29 73 74 72 70 74 72 2c |((char *|)strptr,|
|00003050| 20 22 5c 70 53 44 31 22 | 29 3b 0d 09 09 09 73 74 | "\pSD1"|);....st|
|00003060| 72 70 74 72 20 2b 3d 20 | 28 2a 73 74 72 70 74 72 |rptr += |(*strptr|
|00003070| 29 20 2b 20 31 3b 0d 09 | 09 09 62 72 65 61 6b 3b |) + 1;..|..break;|
|00003080| 0d 09 09 63 61 73 65 09 | 46 4c 4f 41 54 3a 0d 09 |...case.|FLOAT:..|
|00003090| 09 09 50 73 74 72 69 6e | 67 43 6f 70 79 28 28 63 |..Pstrin|gCopy((c|
|000030a0| 68 61 72 20 2a 29 73 74 | 72 70 74 72 2c 20 22 5c |har *)st|rptr, "\|
|000030b0| 70 46 4c 4f 41 54 22 29 | 3b 0d 09 09 09 73 74 72 |pFLOAT")|;....str|
|000030c0| 70 74 72 20 2b 3d 20 28 | 2a 73 74 72 70 74 72 29 |ptr += (|*strptr)|
|000030d0| 20 2b 20 31 3b 0d 09 09 | 09 62 72 65 61 6b 3b 0d | + 1;...|.break;.|
|000030e0| 09 7d 0d 0d 09 09 0d 09 | 4e 75 6d 54 6f 53 74 72 |.}......|NumToStr|
|000030f0| 69 6e 67 28 28 6c 6f 6e | 67 29 6e 63 68 6e 6c 73 |ing((lon|g)nchnls|
|00003100| 2c 20 26 6d 79 53 74 72 | 69 6e 67 29 3b 0d 09 50 |, &myStr|ing);..P|
|00003110| 73 74 72 69 6e 67 43 6f | 70 79 28 28 63 68 61 72 |stringCo|py((char|
|00003120| 20 2a 29 73 74 72 70 74 | 72 2c 20 28 63 68 61 72 | *)strpt|r, (char|
|00003130| 20 2a 29 6d 79 53 74 72 | 69 6e 67 29 3b 0d 09 73 | *)myStr|ing);..s|
|00003140| 74 72 70 74 72 20 2b 3d | 20 28 2a 73 74 72 70 74 |trptr +=| (*strpt|
|00003150| 72 29 20 2b 20 31 3b 0d | 0d 09 4e 75 6d 54 6f 53 |r) + 1;.|..NumToS|
|00003160| 74 72 69 6e 67 28 53 61 | 6d 70 6c 65 52 61 74 65 |tring(Sa|mpleRate|
|00003170| 2c 20 26 6d 79 53 74 72 | 69 6e 67 29 3b 0d 09 50 |, &myStr|ing);..P|
|00003180| 73 74 72 69 6e 67 43 6f | 70 79 28 28 63 68 61 72 |stringCo|py((char|
|00003190| 20 2a 29 73 74 72 70 74 | 72 2c 20 28 63 68 61 72 | *)strpt|r, (char|
|000031a0| 20 2a 29 6d 79 53 74 72 | 69 6e 67 29 3b 0d 09 73 | *)myStr|ing);..s|
|000031b0| 74 72 70 74 72 20 2b 3d | 20 28 2a 73 74 72 70 74 |trptr +=| (*strpt|
|000031c0| 72 29 20 2b 20 31 3b 0d | 09 0d 09 73 70 72 69 6e |r) + 1;.|...sprin|
|000031d0| 74 66 28 28 63 68 61 72 | 20 2a 29 6d 79 53 74 72 |tf((char| *)myStr|
|000031e0| 69 6e 67 2c 20 22 25 6c | 66 22 2c 20 28 64 6f 75 |ing, "%l|f", (dou|
|000031f0| 62 6c 65 29 4d 61 78 53 | 61 6d 70 6c 65 29 3b 0d |ble)MaxS|ample);.|
|00003200| 09 43 74 6f 50 73 74 72 | 28 28 63 68 61 72 20 2a |.CtoPstr|((char *|
|00003210| 29 6d 79 53 74 72 69 6e | 67 29 3b 0d 09 50 73 74 |)myStrin|g);..Pst|
|00003220| 72 69 6e 67 43 6f 70 79 | 28 28 63 68 61 72 20 2a |ringCopy|((char *|
|00003230| 29 73 74 72 70 74 72 2c | 20 28 63 68 61 72 20 2a |)strptr,| (char *|
|00003240| 29 6d 79 53 74 72 69 6e | 67 29 3b 0d 09 73 74 72 |)myStrin|g);..str|
|00003250| 70 74 72 20 2b 3d 20 28 | 2a 73 74 72 70 74 72 29 |ptr += (|*strptr)|
|00003260| 20 2b 20 31 3b 0d 09 0d | 09 73 70 72 69 6e 74 66 | + 1;...|.sprintf|
|00003270| 28 28 63 68 61 72 20 2a | 29 6d 79 53 74 72 69 6e |((char *|)myStrin|
|00003280| 67 2c 20 22 25 6c 66 22 | 2c 20 28 64 6f 75 62 6c |g, "%lf"|, (doubl|
|00003290| 65 29 4d 69 6e 53 61 6d | 70 6c 65 29 3b 0d 09 43 |e)MinSam|ple);..C|
|000032a0| 74 6f 50 73 74 72 28 28 | 63 68 61 72 20 2a 29 6d |toPstr((|char *)m|
|000032b0| 79 53 74 72 69 6e 67 29 | 3b 0d 09 50 73 74 72 69 |yString)|;..Pstri|
|000032c0| 6e 67 43 6f 70 79 28 28 | 63 68 61 72 20 2a 29 73 |ngCopy((|char *)s|
|000032d0| 74 72 70 74 72 2c 20 28 | 63 68 61 72 20 2a 29 6d |trptr, (|char *)m|
|000032e0| 79 53 74 72 69 6e 67 29 | 3b 0d 09 0d 09 0d 09 41 |yString)|;......A|
|000032f0| 64 64 52 65 73 6f 75 72 | 63 65 28 6e 65 77 53 66 |ddResour|ce(newSf|
|00003300| 52 65 73 2c 20 27 53 54 | 52 23 27 2c 20 31 30 30 |Res, 'ST|R#', 100|
|00003310| 30 2c 20 22 5c 70 53 46 | 20 70 61 72 61 6d 73 22 |0, "\pSF| params"|
|00003320| 29 3b 0d 09 69 66 20 28 | 28 74 68 65 45 72 72 20 |);..if (|(theErr |
|00003330| 3d 20 52 65 73 45 72 72 | 6f 72 28 29 29 20 21 3d |= ResErr|or()) !=|
|00003340| 20 6e 6f 45 72 72 29 20 | 7b 0d 09 09 50 73 74 72 | noErr) |{...Pstr|
|00003350| 69 6e 67 43 6f 70 79 28 | 28 63 68 61 72 20 2a 29 |ingCopy(|(char *)|
|00003360| 74 68 65 4d 65 73 73 31 | 2c 20 22 5c 70 41 64 64 |theMess1|, "\pAdd|
|00003370| 52 65 73 6f 75 72 63 65 | 20 65 72 72 6f 72 20 69 |Resource| error i|
|00003380| 6e 20 66 75 6e 63 74 69 | 6f 6e 3a 20 75 70 64 61 |n functi|on: upda|
|00003390| 74 65 53 46 52 65 73 46 | 69 6c 65 28 29 3a 22 29 |teSFResF|ile():")|
|000033a0| 3b 0d 09 09 09 09 4f 53 | 45 72 72 6f 72 28 74 68 |;.....OS|Error(th|
|000033b0| 65 4d 65 73 73 31 2c 20 | 4e 49 4c 2c 20 74 68 65 |eMess1, |NIL, the|
|000033c0| 45 72 72 29 3b 0d 09 09 | 48 55 6e 6c 6f 63 6b 28 |Err);...|HUnlock(|
|000033d0| 6e 65 77 53 66 52 65 73 | 29 3b 0d 09 09 44 69 73 |newSfRes|);...Dis|
|000033e0| 70 6f 73 48 61 6e 64 6c | 65 28 6e 65 77 53 66 52 |posHandl|e(newSfR|
|000033f0| 65 73 29 3b 0d 09 09 74 | 68 65 45 72 72 20 3d 20 |es);...t|heErr = |
|00003400| 50 42 43 6c 6f 73 65 57 | 44 28 26 6d 79 57 44 50 |PBCloseW|D(&myWDP|
|00003410| 61 72 61 6d 42 6c 6b 2c | 20 46 41 4c 53 45 29 3b |aramBlk,| FALSE);|
|00003420| 0d 09 09 55 73 65 52 65 | 73 46 69 6c 65 28 41 70 |...UseRe|sFile(Ap|
|00003430| 70 52 65 73 46 69 6c 65 | 29 3b 0d 09 09 43 75 72 |pResFile|);...Cur|
|00003440| 44 69 72 53 74 6f 72 65 | 20 3d 20 53 74 61 72 74 |DirStore| = Start|
|00003450| 55 70 44 69 72 49 44 3b | 0d 09 09 72 65 74 75 72 |UpDirID;|...retur|
|00003460| 6e 28 46 41 4c 53 45 29 | 3b 0d 09 7d 0d 09 43 68 |n(FALSE)|;..}..Ch|
|00003470| 61 6e 67 65 64 52 65 73 | 6f 75 72 63 65 28 6e 65 |angedRes|ource(ne|
|00003480| 77 53 66 52 65 73 29 3b | 0d 09 69 66 20 28 20 28 |wSfRes);|..if ( (|
|00003490| 74 68 65 45 72 72 20 3d | 20 52 65 73 45 72 72 6f |theErr =| ResErro|
|000034a0| 72 28 29 29 20 21 3d 20 | 6e 6f 45 72 72 20 29 20 |r()) != |noErr ) |
|000034b0| 7b 0d 09 09 50 73 74 72 | 69 6e 67 43 6f 70 79 28 |{...Pstr|ingCopy(|
|000034c0| 28 63 68 61 72 20 2a 29 | 74 68 65 4d 65 73 73 31 |(char *)|theMess1|
|000034d0| 2c 20 22 5c 70 43 68 61 | 6e 67 65 64 52 65 73 6f |, "\pCha|ngedReso|
|000034e0| 75 72 63 65 20 65 72 72 | 6f 72 20 69 6e 20 66 75 |urce err|or in fu|
|000034f0| 6e 63 74 69 6f 6e 3a 20 | 75 70 64 61 74 65 53 46 |nction: |updateSF|
|00003500| 52 65 73 46 69 6c 65 28 | 29 3a 22 29 3b 0d 09 09 |ResFile(|):");...|
|00003510| 4f 53 45 72 72 6f 72 28 | 74 68 65 4d 65 73 73 31 |OSError(|theMess1|
|00003520| 2c 20 53 6f 75 6e 64 46 | 69 6c 65 4e 61 6d 65 2c |, SoundF|ileName,|
|00003530| 20 74 68 65 45 72 72 29 | 3b 0d 09 09 74 68 65 45 | theErr)|;...theE|
|00003540| 72 72 20 3d 20 50 42 43 | 6c 6f 73 65 57 44 28 26 |rr = PBC|loseWD(&|
|00003550| 6d 79 57 44 50 61 72 61 | 6d 42 6c 6b 2c 20 46 41 |myWDPara|mBlk, FA|
|00003560| 4c 53 45 29 3b 0d 09 09 | 43 75 72 44 69 72 53 74 |LSE);...|CurDirSt|
|00003570| 6f 72 65 20 3d 20 53 74 | 61 72 74 55 70 44 69 72 |ore = St|artUpDir|
|00003580| 49 44 3b 0d 09 09 72 65 | 74 75 72 6e 28 46 41 4c |ID;...re|turn(FAL|
|00003590| 53 45 29 3b 0d 09 7d 0d | 09 57 72 69 74 65 52 65 |SE);..}.|.WriteRe|
|000035a0| 73 6f 75 72 63 65 28 6e | 65 77 53 66 52 65 73 29 |source(n|ewSfRes)|
|000035b0| 3b 0d 09 69 66 20 28 20 | 28 74 68 65 45 72 72 20 |;..if ( |(theErr |
|000035c0| 3d 20 52 65 73 45 72 72 | 6f 72 28 29 29 20 21 3d |= ResErr|or()) !=|
|000035d0| 20 6e 6f 45 72 72 20 29 | 20 7b 0d 09 09 50 73 74 | noErr )| {...Pst|
|000035e0| 72 69 6e 67 43 6f 70 79 | 28 28 63 68 61 72 20 2a |ringCopy|((char *|
|000035f0| 29 74 68 65 4d 65 73 73 | 31 2c 20 22 5c 70 57 72 |)theMess|1, "\pWr|
|00003600| 69 74 65 52 65 73 6f 75 | 72 63 65 20 65 72 72 6f |iteResou|rce erro|
|00003610| 72 20 69 6e 20 66 75 6e | 63 74 69 6f 6e 3a 20 75 |r in fun|ction: u|
|00003620| 70 64 61 74 65 53 46 52 | 65 73 46 69 6c 65 28 29 |pdateSFR|esFile()|
|00003630| 3a 22 29 3b 0d 09 09 4f | 53 45 72 72 6f 72 28 74 |:");...O|SError(t|
|00003640| 68 65 4d 65 73 73 31 2c | 20 53 6f 75 6e 64 46 69 |heMess1,| SoundFi|
|00003650| 6c 65 4e 61 6d 65 2c 20 | 74 68 65 45 72 72 29 3b |leName, |theErr);|
|00003660| 0d 09 09 74 68 65 45 72 | 72 20 3d 20 50 42 43 6c |...theEr|r = PBCl|
|00003670| 6f 73 65 57 44 28 26 6d | 79 57 44 50 61 72 61 6d |oseWD(&m|yWDParam|
|00003680| 42 6c 6b 2c 20 46 41 4c | 53 45 29 3b 0d 09 09 43 |Blk, FAL|SE);...C|
|00003690| 75 72 44 69 72 53 74 6f | 72 65 20 3d 20 53 74 61 |urDirSto|re = Sta|
|000036a0| 72 74 55 70 44 69 72 49 | 44 3b 0d 09 09 72 65 74 |rtUpDirI|D;...ret|
|000036b0| 75 72 6e 28 46 41 4c 53 | 45 29 3b 0d 09 7d 0d 09 |urn(FALS|E);..}..|
|000036c0| 0d 09 43 6c 6f 73 65 52 | 65 73 46 69 6c 65 28 73 |..CloseR|esFile(s|
|000036d0| 66 52 65 73 46 69 6c 65 | 52 65 66 4e 75 6d 29 3b |fResFile|RefNum);|
|000036e0| 0d 09 69 66 20 28 20 28 | 74 68 65 45 72 72 20 3d |..if ( (|theErr =|
|000036f0| 20 52 65 73 45 72 72 6f | 72 28 29 29 20 21 3d 20 | ResErro|r()) != |
|00003700| 6e 6f 45 72 72 20 29 20 | 7b 0d 09 09 50 73 74 72 |noErr ) |{...Pstr|
|00003710| 69 6e 67 43 6f 70 79 28 | 28 63 68 61 72 20 2a 29 |ingCopy(|(char *)|
|00003720| 74 68 65 4d 65 73 73 31 | 2c 20 22 5c 70 43 6c 6f |theMess1|, "\pClo|
|00003730| 73 65 52 65 73 46 69 6c | 65 20 65 72 72 6f 72 20 |seResFil|e error |
|00003740| 69 6e 20 66 75 6e 63 74 | 69 6f 6e 3a 20 75 70 64 |in funct|ion: upd|
|00003750| 61 74 65 53 46 52 65 73 | 46 69 6c 65 28 29 3a 22 |ateSFRes|File():"|
|00003760| 29 3b 0d 09 09 4f 53 45 | 72 72 6f 72 28 74 68 65 |);...OSE|rror(the|
|00003770| 4d 65 73 73 31 2c 20 53 | 6f 75 6e 64 46 69 6c 65 |Mess1, S|oundFile|
|00003780| 4e 61 6d 65 2c 20 74 68 | 65 45 72 72 29 3b 0d 09 |Name, th|eErr);..|
|00003790| 09 74 68 65 45 72 72 20 | 3d 20 50 42 43 6c 6f 73 |.theErr |= PBClos|
|000037a0| 65 57 44 28 26 6d 79 57 | 44 50 61 72 61 6d 42 6c |eWD(&myW|DParamBl|
|000037b0| 6b 2c 20 46 41 4c 53 45 | 29 3b 0d 09 09 43 75 72 |k, FALSE|);...Cur|
|000037c0| 44 69 72 53 74 6f 72 65 | 20 3d 20 53 74 61 72 74 |DirStore| = Start|
|000037d0| 55 70 44 69 72 49 44 3b | 0d 09 09 72 65 74 75 72 |UpDirID;|...retur|
|000037e0| 6e 28 46 41 4c 53 45 29 | 3b 0d 09 7d 0d 09 48 55 |n(FALSE)|;..}..HU|
|000037f0| 6e 6c 6f 63 6b 28 6e 65 | 77 53 66 52 65 73 29 3b |nlock(ne|wSfRes);|
|00003800| 0d 09 44 69 73 70 6f 73 | 48 61 6e 64 6c 65 28 6e |..Dispos|Handle(n|
|00003810| 65 77 53 66 52 65 73 29 | 3b 0d 09 55 73 65 52 65 |ewSfRes)|;..UseRe|
|00003820| 73 46 69 6c 65 28 41 70 | 70 52 65 73 46 69 6c 65 |sFile(Ap|pResFile|
|00003830| 29 3b 0d 09 69 66 20 28 | 20 28 74 68 65 45 72 72 |);..if (| (theErr|
|00003840| 20 3d 20 52 65 73 45 72 | 72 6f 72 28 29 29 20 21 | = ResEr|ror()) !|
|00003850| 3d 20 6e 6f 45 72 72 20 | 29 20 7b 0d 09 09 50 73 |= noErr |) {...Ps|
|00003860| 74 72 69 6e 67 43 6f 70 | 79 28 28 63 68 61 72 20 |tringCop|y((char |
|00003870| 2a 29 74 68 65 4d 65 73 | 73 31 2c 20 22 5c 70 55 |*)theMes|s1, "\pU|
|00003880| 73 65 52 65 73 46 69 6c | 65 20 65 72 72 6f 72 20 |seResFil|e error |
|00003890| 69 6e 20 66 75 6e 63 74 | 69 6f 6e 3a 20 75 70 64 |in funct|ion: upd|
|000038a0| 61 74 65 53 46 52 65 73 | 46 69 6c 65 28 29 3a 22 |ateSFRes|File():"|
|000038b0| 29 3b 0d 09 09 4f 53 45 | 72 72 6f 72 28 74 68 65 |);...OSE|rror(the|
|000038c0| 4d 65 73 73 31 2c 20 53 | 6f 75 6e 64 46 69 6c 65 |Mess1, S|oundFile|
|000038d0| 4e 61 6d 65 2c 20 74 68 | 65 45 72 72 29 3b 0d 09 |Name, th|eErr);..|
|000038e0| 09 74 68 65 45 72 72 20 | 3d 20 50 42 43 6c 6f 73 |.theErr |= PBClos|
|000038f0| 65 57 44 28 26 6d 79 57 | 44 50 61 72 61 6d 42 6c |eWD(&myW|DParamBl|
|00003900| 6b 2c 20 46 41 4c 53 45 | 29 3b 0d 09 09 43 75 72 |k, FALSE|);...Cur|
|00003910| 44 69 72 53 74 6f 72 65 | 20 3d 20 53 74 61 72 74 |DirStore| = Start|
|00003920| 55 70 44 69 72 49 44 3b | 0d 09 09 72 65 74 75 72 |UpDirID;|...retur|
|00003930| 6e 28 46 41 4c 53 45 29 | 3b 0d 09 7d 0d 09 43 6c |n(FALSE)|;..}..Cl|
|00003940| 6f 73 65 53 46 28 29 3b | 0d 09 74 68 65 45 72 72 |oseSF();|..theErr|
|00003950| 20 3d 20 50 42 43 6c 6f | 73 65 57 44 28 26 6d 79 | = PBClo|seWD(&my|
|00003960| 57 44 50 61 72 61 6d 42 | 6c 6b 2c 20 46 41 4c 53 |WDParamB|lk, FALS|
|00003970| 45 29 3b 0d 09 43 75 72 | 44 69 72 53 74 6f 72 65 |E);..Cur|DirStore|
|00003980| 20 3d 20 53 74 61 72 74 | 55 70 44 69 72 49 44 3b | = Start|UpDirID;|
|00003990| 0d 09 72 65 74 75 72 6e | 28 54 52 55 45 29 3b 0d |..return|(TRUE);.|
|000039a0| 7d 0d 0d 0d 2f 2a 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |}.../*--|--------|
|000039b0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039c0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000039f0| 2d 2d 2d 2d 2d 2a 2f 0d | 0d 42 6f 6f 6c 65 61 6e |-----*/.|.Boolean|
|00003a00| 09 53 46 56 6f 6c 44 69 | 72 28 73 68 6f 72 74 20 |.SFVolDi|r(short |
|00003a10| 77 64 2c 20 73 68 6f 72 | 74 20 2a 76 6f 6c 75 6d |wd, shor|t *volum|
|00003a20| 65 2c 20 6c 6f 6e 67 20 | 2a 66 6f 6c 64 65 72 29 |e, long |*folder)|
|00003a30| 0d 7b 0d 09 57 44 50 42 | 52 65 63 20 70 62 3b 0d |.{..WDPB|Rec pb;.|
|00003a40| 09 75 6e 73 69 67 6e 65 | 64 20 63 68 61 72 20 6e |.unsigne|d char n|
|00003a50| 61 6d 65 5b 37 32 5d 3b | 0d 09 0d 09 70 62 2e 69 |ame[72];|....pb.i|
|00003a60| 6f 4e 61 6d 65 50 74 72 | 20 3d 20 28 53 74 72 69 |oNamePtr| = (Stri|
|00003a70| 6e 67 50 74 72 29 6e 61 | 6d 65 3b 0d 09 70 62 2e |ngPtr)na|me;..pb.|
|00003a80| 69 6f 56 52 65 66 4e 75 | 6d 20 3d 20 77 64 3b 0d |ioVRefNu|m = wd;.|
|00003a90| 09 70 62 2e 69 6f 57 44 | 49 6e 64 65 78 20 3d 20 |.pb.ioWD|Index = |
|00003aa0| 30 3b 0d 09 70 62 2e 69 | 6f 57 44 50 72 6f 63 49 |0;..pb.i|oWDProcI|
|00003ab0| 44 20 3d 20 30 3b 0d 09 | 70 62 2e 69 6f 57 44 56 |D = 0;..|pb.ioWDV|
|00003ac0| 52 65 66 4e 75 6d 20 3d | 20 30 3b 0d 09 50 42 47 |RefNum =| 0;..PBG|
|00003ad0| 65 74 57 44 49 6e 66 6f | 28 26 70 62 2c 20 66 61 |etWDInfo|(&pb, fa|
|00003ae0| 6c 73 65 29 3b 0d 09 69 | 66 20 28 70 62 2e 69 6f |lse);..i|f (pb.io|
|00003af0| 52 65 73 75 6c 74 29 20 | 72 65 74 75 72 6e 20 70 |Result) |return p|
|00003b00| 62 2e 69 6f 52 65 73 75 | 6c 74 3b 0d 09 2a 76 6f |b.ioResu|lt;..*vo|
|00003b10| 6c 75 6d 65 20 3d 20 70 | 62 2e 69 6f 57 44 56 52 |lume = p|b.ioWDVR|
|00003b20| 65 66 4e 75 6d 3b 0d 09 | 2a 66 6f 6c 64 65 72 20 |efNum;..|*folder |
|00003b30| 3d 20 70 62 2e 69 6f 57 | 44 44 69 72 49 44 3b 0d |= pb.ioW|DDirID;.|
|00003b40| 09 72 65 74 75 72 6e 20 | 28 6e 6f 45 72 72 29 3b |.return |(noErr);|
|00003b50| 0d 7d 0d 0d 0d 2f 2a 0d | 46 75 6c 6c 46 69 6c 65 |.}.../*.|FullFile|
|00003b60| 4e 61 6d 65 20 73 68 6f | 75 6c 64 20 62 65 20 70 |Name sho|uld be p|
|00003b70| 61 73 73 65 64 20 61 6e | 20 65 6d 70 74 79 20 73 |assed an| empty s|
|00003b80| 74 72 69 6e 67 20 69 6e | 20 74 61 69 6c 20 69 66 |tring in| tail if|
|00003b90| 20 79 6f 75 20 6a 75 73 | 74 20 77 61 6e 74 0d 74 | you jus|t want.t|
|00003ba0| 68 65 20 6e 61 6d 65 20 | 6f 66 20 61 20 66 6f 6c |he name |of a fol|
|00003bb0| 64 65 72 2e 0d 2a 2f 0d | 42 6f 6f 6c 65 61 6e 09 |der..*/.|Boolean.|
|00003bc0| 46 75 6c 6c 46 69 6c 65 | 4e 61 6d 65 28 53 74 72 |FullFile|Name(Str|
|00003bd0| 69 6e 67 50 74 72 20 6f | 75 74 6e 61 6d 65 2c 20 |ingPtr o|utname, |
|00003be0| 53 74 72 69 6e 67 50 74 | 72 20 74 61 69 6c 2c 20 |StringPt|r tail, |
|00003bf0| 73 68 6f 72 74 20 76 6f | 6c 75 6d 65 2c 20 6c 6f |short vo|lume, lo|
|00003c00| 6e 67 20 64 69 72 49 44 | 29 0d 7b 0d 09 53 74 72 |ng dirID|).{..Str|
|00003c10| 69 6e 67 48 61 6e 64 6c | 65 20 6e 61 6d 65 3b 0d |ingHandl|e name;.|
|00003c20| 09 53 74 72 32 35 35 20 | 74 65 78 74 2c 20 76 6f |.Str255 |text, vo|
|00003c30| 6c 6e 61 6d 65 3b 0d 09 | 48 56 6f 6c 75 6d 65 50 |lname;..|HVolumeP|
|00003c40| 61 72 61 6d 20 68 76 70 | 3b 0d 09 43 49 6e 66 6f |aram hvp|;..CInfo|
|00003c50| 50 42 52 65 63 20 64 69 | 3b 0d 09 6c 6f 6e 67 20 |PBRec di|;..long |
|00003c60| 73 69 7a 65 3b 0d 09 73 | 68 6f 72 74 20 65 72 72 |size;..s|hort err|
|00003c70| 3b 0d 0d 09 2f 2a 20 65 | 78 74 72 61 63 74 20 74 |;.../* e|xtract t|
|00003c80| 68 65 20 76 6f 6c 75 6d | 65 20 6e 61 6d 65 20 2a |he volum|e name *|
|00003c90| 2f 0d 09 68 76 70 2e 69 | 6f 4e 61 6d 65 50 74 72 |/..hvp.i|oNamePtr|
|00003ca0| 20 3d 20 76 6f 6c 6e 61 | 6d 65 3b 0d 09 68 76 70 | = volna|me;..hvp|
|00003cb0| 2e 69 6f 56 52 65 66 4e | 75 6d 20 3d 20 76 6f 6c |.ioVRefN|um = vol|
|00003cc0| 75 6d 65 3b 0d 09 68 76 | 70 2e 69 6f 56 6f 6c 49 |ume;..hv|p.ioVolI|
|00003cd0| 6e 64 65 78 20 3d 20 30 | 3b 0d 09 50 42 48 47 65 |ndex = 0|;..PBHGe|
|00003ce0| 74 56 49 6e 66 6f 28 28 | 48 50 61 72 6d 42 6c 6b |tVInfo((|HParmBlk|
|00003cf0| 50 74 72 29 26 68 76 70 | 2c 20 66 61 6c 73 65 29 |Ptr)&hvp|, false)|
|00003d00| 3b 0d 09 69 66 20 28 68 | 76 70 2e 69 6f 56 53 69 |;..if (h|vp.ioVSi|
|00003d10| 67 57 6f 72 64 20 3d 3d | 20 30 78 64 32 64 37 29 |gWord ==| 0xd2d7)|
|00003d20| 20 7b 0d 09 09 6f 75 74 | 6e 61 6d 65 5b 30 5d 20 | {...out|name[0] |
|00003d30| 3d 20 30 3b 0d 09 09 72 | 65 74 75 72 6e 20 28 6e |= 0;...r|eturn (n|
|00003d40| 6f 45 72 72 29 3b 0d 09 | 7d 0d 0d 09 2f 2a 20 63 |oErr);..|}.../* c|
|00003d50| 72 65 61 74 65 20 61 6e | 64 20 69 6e 69 74 69 61 |reate an|d initia|
|00003d60| 6c 69 7a 65 20 74 68 65 | 20 6e 61 6d 65 20 68 61 |lize the| name ha|
|00003d70| 6e 64 6c 65 20 2a 2f 0d | 09 69 66 20 28 74 61 69 |ndle */.|.if (tai|
|00003d80| 6c 29 20 7b 0d 09 09 69 | 66 20 28 65 72 72 20 3d |l) {...i|f (err =|
|00003d90| 20 50 74 72 54 6f 48 61 | 6e 64 28 74 61 69 6c 20 | PtrToHa|nd(tail |
|00003da0| 2b 20 31 2c 20 26 6e 61 | 6d 65 2c 20 74 61 69 6c |+ 1, &na|me, tail|
|00003db0| 5b 30 5d 29 29 0d 09 09 | 09 72 65 74 75 72 6e 20 |[0]))...|.return |
|00003dc0| 28 65 72 72 29 3b 0d 09 | 09 73 69 7a 65 20 3d 20 |(err);..|.size = |
|00003dd0| 74 61 69 6c 5b 30 5d 3b | 0d 09 7d 0d 09 65 6c 73 |tail[0];|..}..els|
|00003de0| 65 20 7b 0d 09 09 69 66 | 20 28 28 6e 61 6d 65 20 |e {...if| ((name |
|00003df0| 3d 20 28 53 74 72 69 6e | 67 48 61 6e 64 6c 65 29 |= (Strin|gHandle)|
|00003e00| 4e 65 77 48 61 6e 64 6c | 65 28 4e 49 4c 29 29 20 |NewHandl|e(NIL)) |
|00003e10| 3d 3d 20 30 29 0d 09 09 | 09 72 65 74 75 72 6e 20 |== 0)...|.return |
|00003e20| 28 4d 65 6d 45 72 72 6f | 72 28 29 29 3b 0d 09 09 |(MemErro|r());...|
|00003e30| 73 69 7a 65 20 3d 20 30 | 3b 0d 09 7d 0d 0d 09 2f |size = 0|;..}.../|
|00003e40| 2a 20 6e 6f 77 20 73 74 | 61 72 74 20 65 78 74 72 |* now st|art extr|
|00003e50| 61 63 74 69 6e 67 20 74 | 68 65 20 64 69 72 73 20 |acting t|he dirs |
|00003e60| 61 6e 64 20 70 72 65 70 | 65 6e 64 69 6e 67 20 74 |and prep|ending t|
|00003e70| 68 65 6d 20 74 6f 0d 09 | 20 2a 20 74 68 65 20 68 |hem to..| * the h|
|00003e80| 61 6e 64 6c 65 0d 09 20 | 2a 2f 0d 09 66 6f 72 20 |andle.. |*/..for |
|00003e90| 28 20 3b 20 64 69 72 49 | 44 20 21 3d 20 32 3b 20 |( ; dirI|D != 2; |
|00003ea0| 64 69 72 49 44 20 3d 20 | 64 69 2e 64 69 72 49 6e |dirID = |di.dirIn|
|00003eb0| 66 6f 2e 69 6f 44 72 50 | 61 72 49 44 29 20 7b 0d |fo.ioDrP|arID) {.|
|00003ec0| 09 09 74 65 78 74 5b 30 | 5d 20 3d 20 30 3b 0d 09 |..text[0|] = 0;..|
|00003ed0| 09 64 69 2e 64 69 72 49 | 6e 66 6f 2e 69 6f 4e 61 |.di.dirI|nfo.ioNa|
|00003ee0| 6d 65 50 74 72 20 3d 20 | 74 65 78 74 3b 0d 09 09 |mePtr = |text;...|
|00003ef0| 64 69 2e 64 69 72 49 6e | 66 6f 2e 69 6f 56 52 65 |di.dirIn|fo.ioVRe|
|00003f00| 66 4e 75 6d 20 3d 20 76 | 6f 6c 75 6d 65 3b 0d 09 |fNum = v|olume;..|
|00003f10| 09 64 69 2e 64 69 72 49 | 6e 66 6f 2e 69 6f 46 44 |.di.dirI|nfo.ioFD|
|00003f20| 69 72 49 6e 64 65 78 20 | 3d 20 2d 31 3b 0d 09 09 |irIndex |= -1;...|
|00003f30| 64 69 2e 64 69 72 49 6e | 66 6f 2e 69 6f 44 72 44 |di.dirIn|fo.ioDrD|
|00003f40| 69 72 49 44 20 3d 20 64 | 69 72 49 44 3b 0d 09 09 |irID = d|irID;...|
|00003f50| 50 42 47 65 74 43 61 74 | 49 6e 66 6f 28 26 64 69 |PBGetCat|Info(&di|
|00003f60| 2c 20 66 61 6c 73 65 29 | 3b 0d 09 09 74 65 78 74 |, false)|;...text|
|00003f70| 5b 2b 2b 74 65 78 74 5b | 30 5d 5d 20 3d 20 27 3a |[++text[|0]] = ':|
|00003f80| 27 3b 0d 09 09 53 65 74 | 48 61 6e 64 6c 65 53 69 |';...Set|HandleSi|
|00003f90| 7a 65 28 6e 61 6d 65 2c | 20 73 69 7a 65 20 2b 3d |ze(name,| size +=|
|00003fa0| 20 74 65 78 74 5b 30 5d | 29 3b 0d 09 09 42 6c 6f | text[0]|);...Blo|
|00003fb0| 63 6b 4d 6f 76 65 28 28 | 50 74 72 29 2a 6e 61 6d |ckMove((|Ptr)*nam|
|00003fc0| 65 2c 20 28 50 74 72 29 | 28 2a 6e 61 6d 65 29 20 |e, (Ptr)|(*name) |
|00003fd0| 2b 20 74 65 78 74 5b 30 | 5d 2c 20 73 69 7a 65 20 |+ text[0|], size |
|00003fe0| 2d 20 74 65 78 74 5b 30 | 5d 29 3b 0d 09 09 42 6c |- text[0|]);...Bl|
|00003ff0| 6f 63 6b 4d 6f 76 65 28 | 28 50 74 72 29 74 65 78 |ockMove(|(Ptr)tex|
|00004000| 74 20 2b 20 31 2c 20 28 | 50 74 72 29 2a 6e 61 6d |t + 1, (|Ptr)*nam|
|00004010| 65 2c 20 74 65 78 74 5b | 30 5d 29 3b 0d 09 7d 0d |e, text[|0]);..}.|
|00004020| 0d 09 2f 2a 20 70 72 65 | 70 65 6e 64 20 74 68 65 |../* pre|pend the|
|00004030| 20 76 6f 6c 75 6d 65 20 | 6e 61 6d 65 20 6f 6e 74 | volume |name ont|
|00004040| 6f 20 74 68 65 20 68 61 | 6e 64 6c 65 20 2a 2f 0d |o the ha|ndle */.|
|00004050| 09 76 6f 6c 6e 61 6d 65 | 5b 2b 2b 76 6f 6c 6e 61 |.volname|[++volna|
|00004060| 6d 65 5b 30 5d 5d 20 3d | 20 27 3a 27 3b 0d 09 53 |me[0]] =| ':';..S|
|00004070| 65 74 48 61 6e 64 6c 65 | 53 69 7a 65 28 6e 61 6d |etHandle|Size(nam|
|00004080| 65 2c 20 73 69 7a 65 20 | 2b 3d 20 76 6f 6c 6e 61 |e, size |+= volna|
|00004090| 6d 65 5b 30 5d 29 3b 0d | 09 42 6c 6f 63 6b 4d 6f |me[0]);.|.BlockMo|
|000040a0| 76 65 28 28 50 74 72 29 | 2a 6e 61 6d 65 2c 20 28 |ve((Ptr)|*name, (|
|000040b0| 50 74 72 29 28 2a 6e 61 | 6d 65 29 20 2b 20 76 6f |Ptr)(*na|me) + vo|
|000040c0| 6c 6e 61 6d 65 5b 30 5d | 2c 20 73 69 7a 65 20 2d |lname[0]|, size -|
|000040d0| 20 76 6f 6c 6e 61 6d 65 | 5b 30 5d 29 3b 0d 09 42 | volname|[0]);..B|
|000040e0| 6c 6f 63 6b 4d 6f 76 65 | 28 28 50 74 72 29 76 6f |lockMove|((Ptr)vo|
|000040f0| 6c 6e 61 6d 65 20 2b 20 | 31 2c 20 28 50 74 72 29 |lname + |1, (Ptr)|
|00004100| 2a 6e 61 6d 65 2c 20 76 | 6f 6c 6e 61 6d 65 5b 30 |*name, v|olname[0|
|00004110| 5d 29 3b 0d 0d 09 2f 2a | 20 63 6f 70 79 20 61 6e |]);.../*| copy an|
|00004120| 64 20 64 65 6c 65 74 65 | 20 74 68 65 20 68 61 6e |d delete| the han|
|00004130| 64 6c 65 20 2a 2f 0d 09 | 69 66 20 28 73 69 7a 65 |dle */..|if (size|
|00004140| 20 3e 20 32 35 35 29 20 | 7b 0d 09 09 44 69 73 70 | > 255) |{...Disp|
|00004150| 6f 73 48 61 6e 64 6c 65 | 28 6e 61 6d 65 29 3b 0d |osHandle|(name);.|
|00004160| 09 09 53 79 73 42 65 65 | 70 28 31 32 29 3b 0d 09 |..SysBee|p(12);..|
|00004170| 09 6f 75 74 6e 61 6d 65 | 5b 30 5d 20 3d 20 30 3b |.outname|[0] = 0;|
|00004180| 0d 09 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 09 |...retur|n err;..|
|00004190| 7d 0d 09 6f 75 74 6e 61 | 6d 65 5b 30 5d 20 3d 20 |}..outna|me[0] = |
|000041a0| 73 69 7a 65 3b 0d 09 42 | 6c 6f 63 6b 4d 6f 76 65 |size;..B|lockMove|
|000041b0| 28 28 50 74 72 29 2a 6e | 61 6d 65 2c 20 28 50 74 |((Ptr)*n|ame, (Pt|
|000041c0| 72 29 6f 75 74 6e 61 6d | 65 20 2b 20 31 2c 20 73 |r)outnam|e + 1, s|
|000041d0| 69 7a 65 29 3b 0d 09 44 | 69 73 70 6f 73 48 61 6e |ize);..D|isposHan|
|000041e0| 64 6c 65 28 6e 61 6d 65 | 29 3b 0d 09 72 65 74 75 |dle(name|);..retu|
|000041f0| 72 6e 20 28 6e 6f 45 72 | 72 29 3b 0d 7d 0d 0d 0d |rn (noEr|r);.}...|
|00004200| 2f 2a 20 41 6e 64 20 6f | 6e 20 74 68 65 20 74 68 |/* And o|n the th|
|00004210| 65 6f 72 79 20 74 68 61 | 74 20 79 6f 75 20 6d 69 |eory tha|t you mi|
|00004220| 67 68 74 20 77 61 6e 74 | 20 74 6f 20 63 6f 6e 76 |ght want| to conv|
|00004230| 65 72 74 20 74 68 65 20 | 6e 61 6d 65 20 62 61 63 |ert the |name bac|
|00004240| 6b 20 73 6f 6d 65 20 64 | 61 79 2c 0d 68 65 72 65 |k some d|ay,.here|
|00004250| 27 73 20 61 20 72 6f 75 | 74 69 6e 65 20 49 20 75 |'s a rou|tine I u|
|00004260| 73 65 20 66 6f 72 20 74 | 68 61 74 2e 20 20 4e 6f |se for t|hat. No|
|00004270| 74 69 63 65 20 74 68 61 | 74 20 69 74 20 77 69 6c |tice tha|t it wil|
|00004280| 6c 20 61 63 74 75 61 6c | 6c 79 20 63 72 65 61 74 |l actual|ly creat|
|00004290| 65 20 74 68 65 0d 64 69 | 72 65 63 74 6f 72 79 20 |e the.di|rectory |
|000042a0| 69 66 20 69 74 20 64 6f | 65 73 6e 27 74 20 65 78 |if it do|esn't ex|
|000042b0| 69 73 74 20 6e 6f 77 2e | 20 20 49 66 20 74 68 69 |ist now.| If thi|
|000042c0| 73 20 69 73 6e 27 74 20 | 77 68 61 74 20 79 6f 75 |s isn't |what you|
|000042d0| 20 77 61 6e 74 2c 20 74 | 68 72 6f 77 0d 61 77 61 | want, t|hrow.awa|
|000042e0| 79 20 74 68 65 20 65 72 | 72 6f 72 20 72 65 63 6f |y the er|ror reco|
|000042f0| 76 65 72 79 20 63 6f 64 | 65 2e 0d 2a 2f 0d 0d 4f |very cod|e..*/..O|
|00004300| 53 45 72 72 09 46 75 6c | 6c 54 6f 46 6f 6c 64 65 |SErr.Ful|lToFolde|
|00004310| 72 28 53 74 72 69 6e 67 | 50 74 72 20 6e 61 6d 65 |r(String|Ptr name|
|00004320| 2c 20 73 68 6f 72 74 20 | 2a 76 6f 6c 75 6d 65 2c |, short |*volume,|
|00004330| 20 6c 6f 6e 67 20 2a 66 | 6f 6c 64 65 72 29 0d 7b | long *f|older).{|
|00004340| 0d 09 43 49 6e 66 6f 50 | 42 52 65 63 20 64 69 72 |..CInfoP|BRec dir|
|00004350| 49 6e 66 6f 3b 0d 09 48 | 56 6f 6c 75 6d 65 50 61 |Info;..H|VolumePa|
|00004360| 72 61 6d 20 68 76 70 3b | 0d 09 73 68 6f 72 74 20 |ram hvp;|..short |
|00004370| 69 3b 0d 09 0d 09 64 69 | 72 49 6e 66 6f 2e 64 69 |i;....di|rInfo.di|
|00004380| 72 49 6e 66 6f 2e 69 6f | 4e 61 6d 65 50 74 72 20 |rInfo.io|NamePtr |
|00004390| 3d 20 6e 61 6d 65 3b 0d | 09 64 69 72 49 6e 66 6f |= name;.|.dirInfo|
|000043a0| 2e 64 69 72 49 6e 66 6f | 2e 69 6f 44 72 44 69 72 |.dirInfo|.ioDrDir|
|000043b0| 49 44 20 3d 20 30 3b 0d | 09 64 69 72 49 6e 66 6f |ID = 0;.|.dirInfo|
|000043c0| 2e 64 69 72 49 6e 66 6f | 2e 69 6f 56 52 65 66 4e |.dirInfo|.ioVRefN|
|000043d0| 75 6d 20 3d 20 30 3b 0d | 09 64 69 72 49 6e 66 6f |um = 0;.|.dirInfo|
|000043e0| 2e 64 69 72 49 6e 66 6f | 2e 69 6f 46 44 69 72 49 |.dirInfo|.ioFDirI|
|000043f0| 6e 64 65 78 20 3d 20 30 | 3b 0d 09 69 66 20 28 50 |ndex = 0|;..if (P|
|00004400| 42 47 65 74 43 61 74 49 | 6e 66 6f 20 28 26 64 69 |BGetCatI|nfo (&di|
|00004410| 72 49 6e 66 6f 2c 20 30 | 29 20 3d 3d 20 6e 6f 45 |rInfo, 0|) == noE|
|00004420| 72 72 29 20 7b 0d 09 09 | 69 66 20 28 64 69 72 49 |rr) {...|if (dirI|
|00004430| 6e 66 6f 2e 64 69 72 49 | 6e 66 6f 2e 69 6f 46 6c |nfo.dirI|nfo.ioFl|
|00004440| 41 74 74 72 69 62 20 26 | 20 30 78 31 30 29 20 7b |Attrib &| 0x10) {|
|00004450| 0d 09 09 09 2a 66 6f 6c | 64 65 72 20 3d 20 64 69 |....*fol|der = di|
|00004460| 72 49 6e 66 6f 2e 64 69 | 72 49 6e 66 6f 2e 69 6f |rInfo.di|rInfo.io|
|00004470| 44 72 44 69 72 49 44 3b | 0d 09 09 09 68 76 70 2e |DrDirID;|....hvp.|
|00004480| 69 6f 4e 61 6d 65 50 74 | 72 20 3d 20 6e 61 6d 65 |ioNamePt|r = name|
|00004490| 3b 0d 09 09 09 66 6f 72 | 20 28 69 20 3d 20 30 3b |;....for| (i = 0;|
|000044a0| 20 69 20 3c 20 6e 61 6d | 65 5b 30 5d 3b 20 69 2b | i < nam|e[0]; i+|
|000044b0| 2b 29 0d 09 09 09 09 69 | 66 20 28 6e 61 6d 65 5b |+).....i|f (name[|
|000044c0| 69 2b 31 5d 20 3d 3d 20 | 27 3a 27 29 20 7b 0d 09 |i+1] == |':') {..|
|000044d0| 09 09 09 09 6e 61 6d 65 | 5b 30 5d 20 3d 20 69 20 |....name|[0] = i |
|000044e0| 2b 20 31 3b 20 62 72 65 | 61 6b 3b 0d 09 09 09 09 |+ 1; bre|ak;.....|
|000044f0| 7d 0d 09 09 09 68 76 70 | 2e 69 6f 56 6f 6c 49 6e |}....hvp|.ioVolIn|
|00004500| 64 65 78 20 3d 20 2d 31 | 3b 0d 09 09 09 68 76 70 |dex = -1|;....hvp|
|00004510| 2e 69 6f 56 52 65 66 4e | 75 6d 20 3d 20 30 3b 0d |.ioVRefN|um = 0;.|
|00004520| 09 09 09 50 42 48 47 65 | 74 56 49 6e 66 6f 20 28 |...PBHGe|tVInfo (|
|00004530| 28 48 50 61 72 6d 42 6c | 6b 50 74 72 29 26 68 76 |(HParmBl|kPtr)&hv|
|00004540| 70 2c 20 30 29 3b 0d 09 | 09 09 2a 76 6f 6c 75 6d |p, 0);..|..*volum|
|00004550| 65 20 3d 20 68 76 70 2e | 69 6f 56 52 65 66 4e 75 |e = hvp.|ioVRefNu|
|00004560| 6d 3b 0d 09 09 7d 0d 09 | 09 65 6c 73 65 20 7b 0d |m;...}..|.else {.|
|00004570| 09 09 09 2a 76 6f 6c 75 | 6d 65 20 3d 20 30 3b 0d |...*volu|me = 0;.|
|00004580| 09 09 09 2a 66 6f 6c 64 | 65 72 20 3d 20 30 3b 0d |...*fold|er = 0;.|
|00004590| 09 09 09 72 65 74 75 72 | 6e 20 28 2d 31 29 3b 0d |...retur|n (-1);.|
|000045a0| 09 09 7d 0d 09 7d 0d 09 | 65 6c 73 65 20 69 66 20 |..}..}..|else if |
|000045b0| 28 64 69 72 49 6e 66 6f | 2e 64 69 72 49 6e 66 6f |(dirInfo|.dirInfo|
|000045c0| 2e 69 6f 52 65 73 75 6c | 74 20 3d 3d 20 66 6e 66 |.ioResul|t == fnf|
|000045d0| 45 72 72 20 7c 7c 20 64 | 69 72 49 6e 66 6f 2e 64 |Err || d|irInfo.d|
|000045e0| 69 72 49 6e 66 6f 2e 69 | 6f 52 65 73 75 6c 74 20 |irInfo.i|oResult |
|000045f0| 3d 3d 20 64 69 72 4e 46 | 45 72 72 29 20 7b 0d 09 |== dirNF|Err) {..|
|00004600| 09 20 64 69 72 49 6e 66 | 6f 2e 64 69 72 49 6e 66 |. dirInf|o.dirInf|
|00004610| 6f 2e 69 6f 4e 61 6d 65 | 50 74 72 20 3d 20 28 53 |o.ioName|Ptr = (S|
|00004620| 74 72 69 6e 67 50 74 72 | 29 6e 61 6d 65 3b 0d 09 |tringPtr|)name;..|
|00004630| 09 64 69 72 49 6e 66 6f | 2e 64 69 72 49 6e 66 6f |.dirInfo|.dirInfo|
|00004640| 2e 69 6f 44 72 44 69 72 | 49 44 20 3d 20 30 3b 0d |.ioDrDir|ID = 0;.|
|00004650| 09 09 64 69 72 49 6e 66 | 6f 2e 64 69 72 49 6e 66 |..dirInf|o.dirInf|
|00004660| 6f 2e 69 6f 56 52 65 66 | 4e 75 6d 20 3d 20 30 3b |o.ioVRef|Num = 0;|
|00004670| 0d 09 09 69 66 20 28 50 | 42 44 69 72 43 72 65 61 |...if (P|BDirCrea|
|00004680| 74 65 28 28 48 50 61 72 | 6d 42 6c 6b 50 74 72 29 |te((HPar|mBlkPtr)|
|00004690| 26 64 69 72 49 6e 66 6f | 2c 20 66 61 6c 73 65 29 |&dirInfo|, false)|
|000046a0| 20 3d 3d 20 6e 6f 45 72 | 72 29 20 7b 0d 09 09 09 | == noEr|r) {....|
|000046b0| 2a 76 6f 6c 75 6d 65 20 | 3d 20 64 69 72 49 6e 66 |*volume |= dirInf|
|000046c0| 6f 2e 64 69 72 49 6e 66 | 6f 2e 69 6f 56 52 65 66 |o.dirInf|o.ioVRef|
|000046d0| 4e 75 6d 3b 0d 09 09 09 | 2a 66 6f 6c 64 65 72 20 |Num;....|*folder |
|000046e0| 3d 20 64 69 72 49 6e 66 | 6f 2e 64 69 72 49 6e 66 |= dirInf|o.dirInf|
|000046f0| 6f 2e 69 6f 44 72 44 69 | 72 49 44 3b 0d 09 09 7d |o.ioDrDi|rID;...}|
|00004700| 0d 09 09 65 6c 73 65 20 | 7b 0d 09 09 09 2a 76 6f |...else |{....*vo|
|00004710| 6c 75 6d 65 20 3d 20 30 | 3b 0d 09 09 09 2a 66 6f |lume = 0|;....*fo|
|00004720| 6c 64 65 72 20 3d 20 30 | 3b 0d 09 09 09 72 65 74 |lder = 0|;....ret|
|00004730| 75 72 6e 20 28 64 69 72 | 49 6e 66 6f 2e 64 69 72 |urn (dir|Info.dir|
|00004740| 49 6e 66 6f 2e 69 6f 52 | 65 73 75 6c 74 29 3b 0d |Info.ioR|esult);.|
|00004750| 09 09 7d 0d 09 7d 0d 09 | 65 6c 73 65 20 7b 0d 09 |..}..}..|else {..|
|00004760| 09 2a 76 6f 6c 75 6d 65 | 20 3d 20 30 3b 0d 09 09 |.*volume| = 0;...|
|00004770| 2a 66 6f 6c 64 65 72 20 | 3d 20 30 3b 0d 09 09 72 |*folder |= 0;...r|
|00004780| 65 74 75 72 6e 20 28 64 | 69 72 49 6e 66 6f 2e 64 |eturn (d|irInfo.d|
|00004790| 69 72 49 6e 66 6f 2e 69 | 6f 52 65 73 75 6c 74 29 |irInfo.i|oResult)|
|000047a0| 3b 0d 09 7d 0d 09 72 65 | 74 75 72 6e 20 28 6e 6f |;..}..re|turn (no|
|000047b0| 45 72 72 29 3b 0d 7d 0d | 0d 42 6f 6f 6c 65 61 6e |Err);.}.|.Boolean|
|000047c0| 09 4f 70 65 6e 52 65 70 | 6f 72 74 46 69 6c 65 28 |.OpenRep|ortFile(|
|000047d0| 52 65 70 6f 72 74 46 69 | 6c 65 52 65 66 4e 75 6d |ReportFi|leRefNum|
|000047e0| 29 0d 09 69 6e 74 09 09 | 2a 52 65 70 6f 72 74 46 |)..int..|*ReportF|
|000047f0| 69 6c 65 52 65 66 4e 75 | 6d 3b 0d 7b 0d 09 53 46 |ileRefNu|m;.{..SF|
|00004800| 54 79 70 65 4c 69 73 74 | 09 74 79 70 65 73 3b 0d |TypeList|.types;.|
|00004810| 09 50 6f 69 6e 74 09 09 | 77 68 65 72 65 3b 0d 09 |.Point..|where;..|
|00004820| 65 78 74 65 72 6e 09 09 | 53 74 72 32 35 35 09 73 |extern..|Str255.s|
|00004830| 66 69 6c 65 3b 0d 09 65 | 78 74 65 72 6e 09 09 53 |file;..e|xtern..S|
|00004840| 74 72 32 35 35 09 72 66 | 69 6c 65 3b 0d 09 53 46 |tr255.rf|ile;..SF|
|00004850| 52 65 70 6c 79 09 09 52 | 65 70 6f 72 74 46 69 6c |Reply..R|eportFil|
|00004860| 65 52 65 70 6c 79 3b 0d | 09 65 78 74 65 72 6e 09 |eReply;.|.extern.|
|00004870| 09 69 6e 74 09 72 66 69 | 6c 65 76 52 65 66 4e 75 |.int.rfi|levRefNu|
|00004880| 6d 3b 0d 09 0d 09 50 73 | 74 72 69 6e 67 43 6f 70 |m;....Ps|tringCop|
|00004890| 79 28 28 63 68 61 72 20 | 2a 29 72 66 69 6c 65 2c |y((char |*)rfile,|
|000048a0| 20 28 63 68 61 72 20 2a | 29 73 66 69 6c 65 29 3b | (char *|)sfile);|
|000048b0| 0d 09 50 73 74 72 69 6e | 67 43 61 74 28 28 63 68 |..Pstrin|gCat((ch|
|000048c0| 61 72 20 2a 29 72 66 69 | 6c 65 2c 20 22 5c 70 52 |ar *)rfi|le, "\pR|
|000048d0| 65 70 6f 72 74 22 29 3b | 0d 09 53 65 74 50 74 28 |eport");|..SetPt(|
|000048e0| 26 77 68 65 72 65 2c 20 | 31 30 30 2c 20 31 30 30 |&where, |100, 100|
|000048f0| 29 3b 0d 09 74 79 70 65 | 73 5b 30 5d 20 3d 20 27 |);..type|s[0] = '|
|00004900| 54 45 58 54 27 3b 0d 09 | 53 46 50 75 74 46 69 6c |TEXT';..|SFPutFil|
|00004910| 65 28 77 68 65 72 65 2c | 20 22 5c 70 52 65 70 6f |e(where,| "\pRepo|
|00004920| 72 74 20 46 69 6c 65 20 | 6e 61 6d 65 3a 22 2c 20 |rt File |name:", |
|00004930| 26 72 66 69 6c 65 2c 20 | 4e 49 4c 2c 20 26 52 65 |&rfile, |NIL, &Re|
|00004940| 70 6f 72 74 46 69 6c 65 | 52 65 70 6c 79 29 3b 0d |portFile|Reply);.|
|00004950| 09 69 66 28 21 52 65 70 | 6f 72 74 46 69 6c 65 52 |.if(!Rep|ortFileR|
|00004960| 65 70 6c 79 2e 67 6f 6f | 64 29 0d 09 09 72 65 74 |eply.goo|d)...ret|
|00004970| 75 72 6e 28 46 41 4c 53 | 45 29 3b 0d 09 50 73 74 |urn(FALS|E);..Pst|
|00004980| 72 69 6e 67 43 6f 70 79 | 28 28 63 68 61 72 20 2a |ringCopy|((char *|
|00004990| 29 72 66 69 6c 65 2c 20 | 28 63 68 61 72 20 2a 29 |)rfile, |(char *)|
|000049a0| 52 65 70 6f 72 74 46 69 | 6c 65 52 65 70 6c 79 2e |ReportFi|leReply.|
|000049b0| 66 4e 61 6d 65 29 3b 0d | 09 69 66 20 28 20 28 74 |fName);.|.if ( (t|
|000049c0| 68 65 45 72 72 20 3d 20 | 43 72 65 61 74 65 28 72 |heErr = |Create(r|
|000049d0| 66 69 6c 65 2c 20 52 65 | 70 6f 72 74 46 69 6c 65 |file, Re|portFile|
|000049e0| 52 65 70 6c 79 2e 76 52 | 65 66 4e 75 6d 2c 20 27 |Reply.vR|efNum, '|
|000049f0| 4d 55 34 43 27 2c 20 27 | 54 45 58 54 27 29 29 20 |MU4C', '|TEXT')) |
|00004a00| 21 3d 20 6e 6f 45 72 72 | 20 29 20 7b 0d 09 09 69 |!= noErr| ) {...i|
|00004a10| 66 20 28 20 74 68 65 45 | 72 72 20 3d 3d 20 64 75 |f ( theE|rr == du|
|00004a20| 70 46 4e 45 72 72 20 29 | 20 7b 0d 09 09 09 72 66 |pFNErr )| {....rf|
|00004a30| 69 6c 65 76 52 65 66 4e | 75 6d 20 3d 20 52 65 70 |ilevRefN|um = Rep|
|00004a40| 6f 72 74 46 69 6c 65 52 | 65 70 6c 79 2e 76 52 65 |ortFileR|eply.vRe|
|00004a50| 66 4e 75 6d 3b 0d 09 09 | 09 74 68 65 45 72 72 20 |fNum;...|.theErr |
|00004a60| 3d 20 46 53 44 65 6c 65 | 74 65 28 72 66 69 6c 65 |= FSDele|te(rfile|
|00004a70| 2c 20 72 66 69 6c 65 76 | 52 65 66 4e 75 6d 29 3b |, rfilev|RefNum);|
|00004a80| 0d 09 09 09 69 66 20 28 | 20 28 74 68 65 45 72 72 |....if (| (theErr|
|00004a90| 20 3d 20 43 72 65 61 74 | 65 28 72 66 69 6c 65 2c | = Creat|e(rfile,|
|00004aa0| 20 52 65 70 6f 72 74 46 | 69 6c 65 52 65 70 6c 79 | ReportF|ileReply|
|00004ab0| 2e 76 52 65 66 4e 75 6d | 2c 20 27 4d 55 34 43 27 |.vRefNum|, 'MU4C'|
|00004ac0| 2c 20 27 54 45 58 54 27 | 29 29 20 21 3d 20 6e 6f |, 'TEXT'|)) != no|
|00004ad0| 45 72 72 20 29 20 7b 0d | 09 09 09 09 50 73 74 72 |Err ) {.|....Pstr|
|00004ae0| 69 6e 67 43 6f 70 79 28 | 28 63 68 61 72 20 2a 29 |ingCopy(|(char *)|
|00004af0| 74 68 65 4d 65 73 73 31 | 2c 20 22 5c 70 45 72 72 |theMess1|, "\pErr|
|00004b00| 6f 72 20 63 72 65 61 74 | 69 6e 67 20 72 65 70 6f |or creat|ing repo|
|00004b10| 72 74 20 66 69 6c 65 3a | 22 29 3b 0d 09 09 09 09 |rt file:|");.....|
|00004b20| 4f 53 45 72 72 6f 72 28 | 74 68 65 4d 65 73 73 31 |OSError(|theMess1|
|00004b30| 2c 20 4e 49 4c 2c 20 74 | 68 65 45 72 72 29 3b 0d |, NIL, t|heErr);.|
|00004b40| 09 09 09 09 46 69 78 55 | 70 28 29 3b 0d 09 09 09 |....FixU|p();....|
|00004b50| 09 46 69 6e 69 73 68 28 | 29 3b 0d 09 09 09 7d 0d |.Finish(|);....}.|
|00004b60| 09 09 7d 0d 09 09 65 6c | 73 65 20 7b 0d 09 09 09 |..}...el|se {....|
|00004b70| 50 73 74 72 69 6e 67 43 | 6f 70 79 28 28 63 68 61 |PstringC|opy((cha|
|00004b80| 72 20 2a 29 74 68 65 4d | 65 73 73 31 2c 20 22 5c |r *)theM|ess1, "\|
|00004b90| 70 45 72 72 6f 72 20 6f | 70 65 6e 69 6e 67 20 72 |pError o|pening r|
|00004ba0| 65 70 6f 72 74 20 66 69 | 6c 65 3a 22 29 3b 0d 09 |eport fi|le:");..|
|00004bb0| 09 09 4f 53 45 72 72 6f | 72 28 74 68 65 4d 65 73 |..OSErro|r(theMes|
|00004bc0| 73 31 2c 20 4e 49 4c 2c | 20 74 68 65 45 72 72 29 |s1, NIL,| theErr)|
|00004bd0| 3b 0d 09 09 09 46 69 78 | 55 70 28 29 3b 0d 09 09 |;....Fix|Up();...|
|00004be0| 09 46 69 6e 69 73 68 28 | 29 3b 0d 09 09 7d 0d 0d |.Finish(|);...}..|
|00004bf0| 09 7d 0d 09 74 68 65 45 | 72 72 20 3d 20 46 53 4f |.}..theE|rr = FSO|
|00004c00| 70 65 6e 28 72 66 69 6c | 65 2c 20 52 65 70 6f 72 |pen(rfil|e, Repor|
|00004c10| 74 46 69 6c 65 52 65 70 | 6c 79 2e 76 52 65 66 4e |tFileRep|ly.vRefN|
|00004c20| 75 6d 2c 20 52 65 70 6f | 72 74 46 69 6c 65 52 65 |um, Repo|rtFileRe|
|00004c30| 66 4e 75 6d 29 3b 0d 09 | 69 66 20 28 20 74 68 65 |fNum);..|if ( the|
|00004c40| 45 72 72 20 21 3d 20 6e | 6f 45 72 72 20 29 20 7b |Err != n|oErr ) {|
|00004c50| 0d 09 09 50 73 74 72 69 | 6e 67 43 6f 70 79 28 28 |...Pstri|ngCopy((|
|00004c60| 63 68 61 72 20 2a 29 74 | 68 65 4d 65 73 73 31 2c |char *)t|heMess1,|
|00004c70| 20 22 5c 70 45 72 72 6f | 72 20 6f 70 65 6e 69 6e | "\pErro|r openin|
|00004c80| 67 20 72 65 70 6f 72 74 | 20 66 69 6c 65 3a 22 29 |g report| file:")|
|00004c90| 3b 0d 09 09 4f 53 45 72 | 72 6f 72 28 74 68 65 4d |;...OSEr|ror(theM|
|00004ca0| 65 73 73 31 2c 20 4e 49 | 4c 2c 20 74 68 65 45 72 |ess1, NI|L, theEr|
|00004cb0| 72 29 3b 0d 09 09 46 69 | 78 55 70 28 29 3b 0d 09 |r);...Fi|xUp();..|
|00004cc0| 09 46 69 6e 69 73 68 28 | 29 3b 0d 09 7d 0d 0d 09 |.Finish(|);..}...|
|00004cd0| 72 65 74 75 72 6e 28 54 | 52 55 45 29 3b 0d 7d 0d |return(T|RUE);.}.|
|00004ce0| 0d 0d 0d 76 6f 69 64 09 | 46 69 78 55 70 28 29 0d |...void.|FixUp().|
|00004cf0| 7b 0d 09 69 66 20 28 20 | 53 74 61 72 74 44 69 72 |{..if ( |StartDir|
|00004d00| 4e 61 6d 65 5b 30 5d 20 | 21 3d 20 4e 49 4c 20 29 |Name[0] |!= NIL )|
|00004d10| 20 7b 0d 09 09 53 65 74 | 53 46 44 69 72 28 53 74 | {...Set|SFDir(St|
|00004d20| 61 72 74 44 69 72 4e 61 | 6d 65 2c 20 26 53 74 61 |artDirNa|me, &Sta|
|00004d30| 72 74 55 70 44 69 72 49 | 44 29 3b 0d 09 7d 0d 7d |rtUpDirI|D);..}.}|
|00004d40| 0d 76 6f 69 64 09 46 69 | 6e 69 73 68 28 29 0d 7b |.void.Fi|nish().{|
|00004d50| 0d 09 49 6e 69 74 43 75 | 72 73 6f 72 28 29 3b 0d |..InitCu|rsor();.|
|00004d60| 09 45 78 69 74 54 6f 53 | 68 65 6c 6c 28 29 3b 0d |.ExitToS|hell();.|
|00004d70| 7d 0d 0d 0d 0d 42 6f 6f | 6c 65 61 6e 09 64 6f 53 |}....Boo|lean.doS|
|00004d80| 44 32 52 65 73 6f 75 72 | 63 65 73 28 29 0d 7b 0d |D2Resour|ces().{.|
|00004d90| 09 72 65 67 69 73 74 65 | 72 09 09 69 3b 0d 09 53 |.registe|r..i;..S|
|00004da0| 74 72 69 6e 67 48 61 6e | 64 6c 65 09 6d 79 53 74 |tringHan|dle.mySt|
|00004db0| 72 69 6e 67 48 61 6e 64 | 6c 65 31 2c 20 6d 79 53 |ringHand|le1, myS|
|00004dc0| 74 72 69 6e 67 48 61 6e | 64 6c 65 32 2c 20 6d 79 |tringHan|dle2, my|
|00004dd0| 53 74 72 69 6e 67 48 61 | 6e 64 6c 65 33 3b 0d 09 |StringHa|ndle3;..|
|00004de0| 53 74 72 32 35 35 09 09 | 09 6d 79 53 74 72 69 6e |Str255..|.myStrin|
|00004df0| 67 3b 0d 0d 09 6d 79 53 | 74 72 69 6e 67 48 61 6e |g;...myS|tringHan|
|00004e00| 64 6c 65 31 20 3d 20 28 | 53 74 72 69 6e 67 48 61 |dle1 = (|StringHa|
|00004e10| 6e 64 6c 65 29 4e 65 77 | 48 61 6e 64 6c 65 28 73 |ndle)New|Handle(s|
|00004e20| 69 7a 65 6f 66 28 53 74 | 72 69 6e 67 48 61 6e 64 |izeof(St|ringHand|
|00004e30| 6c 65 29 29 3b 0d 09 69 | 20 3d 20 73 70 72 69 6e |le));..i| = sprin|
|00004e40| 74 66 28 28 63 68 61 72 | 20 2a 29 6d 79 53 74 72 |tf((char| *)myStr|
|00004e50| 69 6e 67 2c 20 22 25 64 | 22 2c 20 28 69 6e 74 29 |ing, "%d|", (int)|
|00004e60| 6e 63 68 6e 6c 73 29 3b | 0d 09 43 74 6f 50 73 74 |nchnls);|..CtoPst|
|00004e70| 72 28 28 63 68 61 72 20 | 2a 29 6d 79 53 74 72 69 |r((char |*)myStri|
|00004e80| 6e 67 29 3b 0d 09 53 65 | 74 53 74 72 69 6e 67 28 |ng);..Se|tString(|
|00004e90| 6d 79 53 74 72 69 6e 67 | 48 61 6e 64 6c 65 31 2c |myString|Handle1,|
|00004ea0| 20 6d 79 53 74 72 69 6e | 67 29 3b 0d 09 48 4c 6f | myStrin|g);..HLo|
|00004eb0| 63 6b 28 28 48 61 6e 64 | 6c 65 29 6d 79 53 74 72 |ck((Hand|le)myStr|
|00004ec0| 69 6e 67 48 61 6e 64 6c | 65 31 29 3b 0d 09 41 64 |ingHandl|e1);..Ad|
|00004ed0| 64 52 65 73 6f 75 72 63 | 65 28 28 48 61 6e 64 6c |dResourc|e((Handl|
|00004ee0| 65 29 6d 79 53 74 72 69 | 6e 67 48 61 6e 64 6c 65 |e)myStri|ngHandle|
|00004ef0| 31 2c 20 27 53 54 52 20 | 27 2c 20 53 41 4d 50 4c |1, 'STR |', SAMPL|
|00004f00| 45 5f 43 48 41 4e 4e 45 | 4c 53 5f 52 45 53 2c 20 |E_CHANNE|LS_RES, |
|00004f10| 22 5c 70 63 68 61 6e 6e | 65 6c 73 22 29 3b 0d 09 |"\pchann|els");..|
|00004f20| 48 55 6e 6c 6f 63 6b 28 | 28 48 61 6e 64 6c 65 29 |HUnlock(|(Handle)|
|00004f30| 6d 79 53 74 72 69 6e 67 | 48 61 6e 64 6c 65 31 29 |myString|Handle1)|
|00004f40| 3b 0d 09 0d 09 43 68 61 | 6e 67 65 64 52 65 73 6f |;....Cha|ngedReso|
|00004f50| 75 72 63 65 28 28 48 61 | 6e 64 6c 65 29 6d 79 53 |urce((Ha|ndle)myS|
|00004f60| 74 72 69 6e 67 48 61 6e | 64 6c 65 31 29 3b 0d 09 |tringHan|dle1);..|
|00004f70| 69 66 20 28 20 28 74 68 | 65 45 72 72 20 3d 20 52 |if ( (th|eErr = R|
|00004f80| 65 73 45 72 72 6f 72 28 | 29 29 20 21 3d 20 6e 6f |esError(|)) != no|
|00004f90| 45 72 72 20 29 20 7b 0d | 09 09 50 73 74 72 69 6e |Err ) {.|..Pstrin|
|00004fa0| 67 43 6f 70 79 28 28 63 | 68 61 72 20 2a 29 74 68 |gCopy((c|har *)th|
|00004fb0| 65 4d 65 73 73 31 2c 20 | 22 5c 70 43 68 61 6e 67 |eMess1, |"\pChang|
|00004fc0| 65 64 52 65 73 6f 75 72 | 63 65 20 65 72 72 6f 72 |edResour|ce error|
|00004fd0| 20 69 6e 20 75 70 64 61 | 74 65 4e 65 77 53 46 52 | in upda|teNewSFR|
|00004fe0| 65 73 46 69 6c 65 28 29 | 22 29 3b 0d 09 09 4f 53 |esFile()|");...OS|
|00004ff0| 45 72 72 6f 72 28 74 68 | 65 4d 65 73 73 31 2c 20 |Error(th|eMess1, |
|00005000| 53 6f 75 6e 64 46 69 6c | 65 4e 61 6d 65 2c 20 74 |SoundFil|eName, t|
|00005010| 68 65 45 72 72 29 3b 0d | 09 09 48 55 6e 6c 6f 63 |heErr);.|..HUnloc|
|00005020| 6b 28 28 48 61 6e 64 6c | 65 29 6d 79 53 74 72 69 |k((Handl|e)myStri|
|00005030| 6e 67 48 61 6e 64 6c 65 | 31 29 3b 0d 09 09 44 69 |ngHandle|1);...Di|
|00005040| 73 70 6f 73 48 61 6e 64 | 6c 65 28 28 48 61 6e 64 |sposHand|le((Hand|
|00005050| 6c 65 29 6d 79 53 74 72 | 69 6e 67 48 61 6e 64 6c |le)myStr|ingHandl|
|00005060| 65 31 29 3b 0d 09 09 72 | 65 74 75 72 6e 28 46 41 |e1);...r|eturn(FA|
|00005070| 4c 53 45 29 3b 0d 09 7d | 0d 09 57 72 69 74 65 52 |LSE);..}|..WriteR|
|00005080| 65 73 6f 75 72 63 65 28 | 28 48 61 6e 64 6c 65 29 |esource(|(Handle)|
|00005090| 6d 79 53 74 72 69 6e 67 | 48 61 6e 64 6c 65 31 29 |myString|Handle1)|
|000050a0| 3b 0d 09 69 66 20 28 20 | 28 74 68 65 45 72 72 20 |;..if ( |(theErr |
|000050b0| 3d 20 52 65 73 45 72 72 | 6f 72 28 29 29 20 21 3d |= ResErr|or()) !=|
|000050c0| 20 6e 6f 45 72 72 20 29 | 20 7b 0d 09 09 50 73 74 | noErr )| {...Pst|
|000050d0| 72 69 6e 67 43 6f 70 79 | 28 28 63 68 61 72 20 2a |ringCopy|((char *|
|000050e0| 29 74 68 65 4d 65 73 73 | 31 2c 20 22 5c 70 57 72 |)theMess|1, "\pWr|
|000050f0| 69 74 65 52 65 73 6f 75 | 72 63 65 20 65 72 72 6f |iteResou|rce erro|
|00005100| 72 20 69 6e 20 75 70 64 | 61 74 65 4e 65 77 53 46 |r in upd|ateNewSF|
|00005110| 52 65 73 46 69 6c 65 28 | 29 22 29 3b 0d 09 09 4f |ResFile(|)");...O|
|00005120| 53 45 72 72 6f 72 28 74 | 68 65 4d 65 73 73 31 2c |SError(t|heMess1,|
|00005130| 20 53 6f 75 6e 64 46 69 | 6c 65 4e 61 6d 65 2c 20 | SoundFi|leName, |
|00005140| 74 68 65 45 72 72 29 3b | 0d 09 09 48 55 6e 6c 6f |theErr);|...HUnlo|
|00005150| 63 6b 28 28 48 61 6e 64 | 6c 65 29 6d 79 53 74 72 |ck((Hand|le)myStr|
|00005160| 69 6e 67 48 61 6e 64 6c | 65 31 29 3b 0d 09 09 44 |ingHandl|e1);...D|
|00005170| 69 73 70 6f 73 48 61 6e | 64 6c 65 28 28 48 61 6e |isposHan|dle((Han|
|00005180| 64 6c 65 29 6d 79 53 74 | 72 69 6e 67 48 61 6e 64 |dle)mySt|ringHand|
|00005190| 6c 65 31 29 3b 0d 09 09 | 72 65 74 75 72 6e 28 46 |le1);...|return(F|
|000051a0| 41 4c 53 45 29 3b 0d 09 | 7d 0d 0d 09 6d 79 53 74 |ALSE);..|}...mySt|
|000051b0| 72 69 6e 67 48 61 6e 64 | 6c 65 32 20 3d 20 28 53 |ringHand|le2 = (S|
|000051c0| 74 72 69 6e 67 48 61 6e | 64 6c 65 29 4e 65 77 48 |tringHan|dle)NewH|
|000051d0| 61 6e 64 6c 65 28 73 69 | 7a 65 6f 66 28 53 74 72 |andle(si|zeof(Str|
|000051e0| 69 6e 67 48 61 6e 64 6c | 65 29 29 3b 0d 09 69 20 |ingHandl|e));..i |
|000051f0| 3d 20 73 70 72 69 6e 74 | 66 28 28 63 68 61 72 20 |= sprint|f((char |
|00005200| 2a 29 6d 79 53 74 72 69 | 6e 67 2c 20 22 25 6c 64 |*)myStri|ng, "%ld|
|00005210| 22 2c 20 28 6c 6f 6e 67 | 29 53 61 6d 70 6c 65 52 |", (long|)SampleR|
|00005220| 61 74 65 29 3b 0d 09 43 | 74 6f 50 73 74 72 28 28 |ate);..C|toPstr((|
|00005230| 63 68 61 72 20 2a 29 6d | 79 53 74 72 69 6e 67 29 |char *)m|yString)|
|00005240| 3b 0d 09 53 65 74 53 74 | 72 69 6e 67 28 6d 79 53 |;..SetSt|ring(myS|
|00005250| 74 72 69 6e 67 48 61 6e | 64 6c 65 32 2c 20 6d 79 |tringHan|dle2, my|
|00005260| 53 74 72 69 6e 67 29 3b | 0d 09 48 4c 6f 63 6b 28 |String);|..HLock(|
|00005270| 28 48 61 6e 64 6c 65 29 | 6d 79 53 74 72 69 6e 67 |(Handle)|myString|
|00005280| 48 61 6e 64 6c 65 32 29 | 3b 0d 09 41 64 64 52 65 |Handle2)|;..AddRe|
|00005290| 73 6f 75 72 63 65 28 28 | 48 61 6e 64 6c 65 29 6d |source((|Handle)m|
|000052a0| 79 53 74 72 69 6e 67 48 | 61 6e 64 6c 65 32 2c 20 |yStringH|andle2, |
|000052b0| 27 53 54 52 20 27 2c 20 | 53 41 4d 50 4c 45 5f 52 |'STR ', |SAMPLE_R|
|000052c0| 41 54 45 5f 52 45 53 2c | 20 22 5c 70 73 61 6d 70 |ATE_RES,| "\psamp|
|000052d0| 6c 65 2d 72 61 74 65 22 | 29 3b 0d 09 48 55 6e 6c |le-rate"|);..HUnl|
|000052e0| 6f 63 6b 28 28 48 61 6e | 64 6c 65 29 6d 79 53 74 |ock((Han|dle)mySt|
|000052f0| 72 69 6e 67 48 61 6e 64 | 6c 65 32 29 3b 0d 0d 09 |ringHand|le2);...|
|00005300| 43 68 61 6e 67 65 64 52 | 65 73 6f 75 72 63 65 28 |ChangedR|esource(|
|00005310| 28 48 61 6e 64 6c 65 29 | 6d 79 53 74 72 69 6e 67 |(Handle)|myString|
|00005320| 48 61 6e 64 6c 65 32 29 | 3b 0d 09 69 66 20 28 20 |Handle2)|;..if ( |
|00005330| 28 74 68 65 45 72 72 20 | 3d 20 52 65 73 45 72 72 |(theErr |= ResErr|
|00005340| 6f 72 28 29 29 20 21 3d | 20 6e 6f 45 72 72 20 29 |or()) !=| noErr )|
|00005350| 20 7b 0d 09 09 50 73 74 | 72 69 6e 67 43 6f 70 79 | {...Pst|ringCopy|
|00005360| 28 28 63 68 61 72 20 2a | 29 74 68 65 4d 65 73 73 |((char *|)theMess|
|00005370| 31 2c 20 22 5c 70 43 68 | 61 6e 67 65 64 52 65 73 |1, "\pCh|angedRes|
|00005380| 6f 75 72 63 65 20 65 72 | 72 6f 72 20 69 6e 20 75 |ource er|ror in u|
|00005390| 70 64 61 74 65 4e 65 77 | 53 46 52 65 73 46 69 6c |pdateNew|SFResFil|
|000053a0| 65 28 29 22 29 3b 0d 09 | 09 4f 53 45 72 72 6f 72 |e()");..|.OSError|
|000053b0| 28 74 68 65 4d 65 73 73 | 31 2c 20 53 6f 75 6e 64 |(theMess|1, Sound|
|000053c0| 46 69 6c 65 4e 61 6d 65 | 2c 20 74 68 65 45 72 72 |FileName|, theErr|
|000053d0| 29 3b 0d 09 09 48 55 6e | 6c 6f 63 6b 28 28 48 61 |);...HUn|lock((Ha|
|000053e0| 6e 64 6c 65 29 6d 79 53 | 74 72 69 6e 67 48 61 6e |ndle)myS|tringHan|
|000053f0| 64 6c 65 32 29 3b 0d 09 | 09 44 69 73 70 6f 73 48 |dle2);..|.DisposH|
|00005400| 61 6e 64 6c 65 28 28 48 | 61 6e 64 6c 65 29 6d 79 |andle((H|andle)my|
|00005410| 53 74 72 69 6e 67 48 61 | 6e 64 6c 65 32 29 3b 0d |StringHa|ndle2);.|
|00005420| 09 09 72 65 74 75 72 6e | 28 46 41 4c 53 45 29 3b |..return|(FALSE);|
|00005430| 0d 09 7d 0d 09 57 72 69 | 74 65 52 65 73 6f 75 72 |..}..Wri|teResour|
|00005440| 63 65 28 28 48 61 6e 64 | 6c 65 29 6d 79 53 74 72 |ce((Hand|le)myStr|
|00005450| 69 6e 67 48 61 6e 64 6c | 65 32 29 3b 0d 09 69 66 |ingHandl|e2);..if|
|00005460| 20 28 20 28 74 68 65 45 | 72 72 20 3d 20 52 65 73 | ( (theE|rr = Res|
|00005470| 45 72 72 6f 72 28 29 29 | 20 21 3d 20 6e 6f 45 72 |Error())| != noEr|
|00005480| 72 20 29 20 7b 0d 09 09 | 50 73 74 72 69 6e 67 43 |r ) {...|PstringC|
|00005490| 6f 70 79 28 28 63 68 61 | 72 20 2a 29 74 68 65 4d |opy((cha|r *)theM|
|000054a0| 65 73 73 31 2c 20 22 5c | 70 57 72 69 74 65 52 65 |ess1, "\|pWriteRe|
|000054b0| 73 6f 75 72 63 65 20 65 | 72 72 6f 72 20 69 6e 20 |source e|rror in |
|000054c0| 75 70 64 61 74 65 4e 65 | 77 53 46 52 65 73 46 69 |updateNe|wSFResFi|
|000054d0| 6c 65 28 29 22 29 3b 0d | 09 09 4f 53 45 72 72 6f |le()");.|..OSErro|
|000054e0| 72 28 74 68 65 4d 65 73 | 73 31 2c 20 53 6f 75 6e |r(theMes|s1, Soun|
|000054f0| 64 46 69 6c 65 4e 61 6d | 65 2c 20 74 68 65 45 72 |dFileNam|e, theEr|
|00005500| 72 29 3b 0d 09 09 48 55 | 6e 6c 6f 63 6b 28 28 48 |r);...HU|nlock((H|
|00005510| 61 6e 64 6c 65 29 6d 79 | 53 74 72 69 6e 67 48 61 |andle)my|StringHa|
|00005520| 6e 64 6c 65 32 29 3b 0d | 09 09 44 69 73 70 6f 73 |ndle2);.|..Dispos|
|00005530| 48 61 6e 64 6c 65 28 28 | 48 61 6e 64 6c 65 29 6d |Handle((|Handle)m|
|00005540| 79 53 74 72 69 6e 67 48 | 61 6e 64 6c 65 32 29 3b |yStringH|andle2);|
|00005550| 0d 09 09 72 65 74 75 72 | 6e 28 46 41 4c 53 45 29 |...retur|n(FALSE)|
|00005560| 3b 0d 09 7d 0d 0d 0d 0d | 09 6d 79 53 74 72 69 6e |;..}....|.myStrin|
|00005570| 67 48 61 6e 64 6c 65 33 | 20 3d 20 28 53 74 72 69 |gHandle3| = (Stri|
|00005580| 6e 67 48 61 6e 64 6c 65 | 29 4e 65 77 48 61 6e 64 |ngHandle|)NewHand|
|00005590| 6c 65 28 73 69 7a 65 6f | 66 28 53 74 72 69 6e 67 |le(sizeo|f(String|
|000055a0| 48 61 6e 64 6c 65 29 29 | 3b 0d 09 53 65 74 53 74 |Handle))|;..SetSt|
|000055b0| 72 69 6e 67 28 6d 79 53 | 74 72 69 6e 67 48 61 6e |ring(myS|tringHan|
|000055c0| 64 6c 65 33 2c 20 22 5c | 70 32 22 29 3b 0d 09 48 |dle3, "\|p2");..H|
|000055d0| 4c 6f 63 6b 28 28 48 61 | 6e 64 6c 65 29 6d 79 53 |Lock((Ha|ndle)myS|
|000055e0| 74 72 69 6e 67 48 61 6e | 64 6c 65 33 29 3b 0d 09 |tringHan|dle3);..|
|000055f0| 41 64 64 52 65 73 6f 75 | 72 63 65 28 28 48 61 6e |AddResou|rce((Han|
|00005600| 64 6c 65 29 6d 79 53 74 | 72 69 6e 67 48 61 6e 64 |dle)mySt|ringHand|
|00005610| 6c 65 33 2c 20 27 53 54 | 52 20 27 2c 20 53 41 4d |le3, 'ST|R ', SAM|
|00005620| 50 4c 45 5f 53 49 5a 45 | 5f 52 45 53 2c 20 22 5c |PLE_SIZE|_RES, "\|
|00005630| 70 73 61 6d 70 6c 65 2d | 73 69 7a 65 22 29 3b 0d |psample-|size");.|
|00005640| 09 48 55 6e 6c 6f 63 6b | 28 28 48 61 6e 64 6c 65 |.HUnlock|((Handle|
|00005650| 29 6d 79 53 74 72 69 6e | 67 48 61 6e 64 6c 65 33 |)myStrin|gHandle3|
|00005660| 29 3b 0d 0d 09 69 66 20 | 28 28 74 68 65 45 72 72 |);...if |((theErr|
|00005670| 20 3d 20 52 65 73 45 72 | 72 6f 72 28 29 29 20 21 | = ResEr|ror()) !|
|00005680| 3d 20 6e 6f 45 72 72 29 | 20 7b 0d 09 09 50 73 74 |= noErr)| {...Pst|
|00005690| 72 69 6e 67 43 6f 70 79 | 28 28 63 68 61 72 20 2a |ringCopy|((char *|
|000056a0| 29 74 68 65 4d 65 73 73 | 31 2c 20 22 5c 70 41 64 |)theMess|1, "\pAd|
|000056b0| 64 52 65 73 6f 75 72 63 | 65 20 65 72 72 6f 72 20 |dResourc|e error |
|000056c0| 69 6e 20 75 70 64 61 74 | 65 4e 65 77 53 46 52 65 |in updat|eNewSFRe|
|000056d0| 73 46 69 6c 65 28 29 22 | 29 3b 0d 09 09 4f 53 45 |sFile()"|);...OSE|
|000056e0| 72 72 6f 72 28 74 68 65 | 4d 65 73 73 31 2c 20 53 |rror(the|Mess1, S|
|000056f0| 6f 75 6e 64 46 69 6c 65 | 4e 61 6d 65 2c 20 74 68 |oundFile|Name, th|
|00005700| 65 45 72 72 29 3b 0d 09 | 09 48 55 6e 6c 6f 63 6b |eErr);..|.HUnlock|
|00005710| 28 28 48 61 6e 64 6c 65 | 29 6d 79 53 74 72 69 6e |((Handle|)myStrin|
|00005720| 67 48 61 6e 64 6c 65 33 | 29 3b 0d 09 09 44 69 73 |gHandle3|);...Dis|
|00005730| 70 6f 73 48 61 6e 64 6c | 65 28 28 48 61 6e 64 6c |posHandl|e((Handl|
|00005740| 65 29 6d 79 53 74 72 69 | 6e 67 48 61 6e 64 6c 65 |e)myStri|ngHandle|
|00005750| 33 29 3b 0d 09 09 72 65 | 74 75 72 6e 28 46 41 4c |3);...re|turn(FAL|
|00005760| 53 45 29 3b 0d 09 7d 0d | 09 43 68 61 6e 67 65 64 |SE);..}.|.Changed|
|00005770| 52 65 73 6f 75 72 63 65 | 28 28 48 61 6e 64 6c 65 |Resource|((Handle|
|00005780| 29 6d 79 53 74 72 69 6e | 67 48 61 6e 64 6c 65 33 |)myStrin|gHandle3|
|00005790| 29 3b 0d 09 69 66 20 28 | 20 28 74 68 65 45 72 72 |);..if (| (theErr|
|000057a0| 20 3d 20 52 65 73 45 72 | 72 6f 72 28 29 29 20 21 | = ResEr|ror()) !|
|000057b0| 3d 20 6e 6f 45 72 72 20 | 29 20 7b 0d 09 09 50 73 |= noErr |) {...Ps|
|000057c0| 74 72 69 6e 67 43 6f 70 | 79 28 28 63 68 61 72 20 |tringCop|y((char |
|000057d0| 2a 29 74 68 65 4d 65 73 | 73 31 2c 20 22 5c 70 43 |*)theMes|s1, "\pC|
|000057e0| 68 61 6e 67 65 64 52 65 | 73 6f 75 72 63 65 20 65 |hangedRe|source e|
|000057f0| 72 72 6f 72 20 69 6e 20 | 75 70 64 61 74 65 4e 65 |rror in |updateNe|
|00005800| 77 53 46 52 65 73 46 69 | 6c 65 28 29 22 29 3b 0d |wSFResFi|le()");.|
|00005810| 09 09 4f 53 45 72 72 6f | 72 28 74 68 65 4d 65 73 |..OSErro|r(theMes|
|00005820| 73 31 2c 20 53 6f 75 6e | 64 46 69 6c 65 4e 61 6d |s1, Soun|dFileNam|
|00005830| 65 2c 20 74 68 65 45 72 | 72 29 3b 0d 09 09 48 55 |e, theEr|r);...HU|
|00005840| 6e 6c 6f 63 6b 28 28 48 | 61 6e 64 6c 65 29 6d 79 |nlock((H|andle)my|
|00005850| 53 74 72 69 6e 67 48 61 | 6e 64 6c 65 33 29 3b 0d |StringHa|ndle3);.|
|00005860| 09 09 44 69 73 70 6f 73 | 48 61 6e 64 6c 65 28 28 |..Dispos|Handle((|
|00005870| 48 61 6e 64 6c 65 29 6d | 79 53 74 72 69 6e 67 48 |Handle)m|yStringH|
|00005880| 61 6e 64 6c 65 33 29 3b | 0d 09 09 72 65 74 75 72 |andle3);|...retur|
|00005890| 6e 28 46 41 4c 53 45 29 | 3b 0d 09 7d 0d 09 57 72 |n(FALSE)|;..}..Wr|
|000058a0| 69 74 65 52 65 73 6f 75 | 72 63 65 28 28 48 61 6e |iteResou|rce((Han|
|000058b0| 64 6c 65 29 6d 79 53 74 | 72 69 6e 67 48 61 6e 64 |dle)mySt|ringHand|
|000058c0| 6c 65 33 29 3b 0d 09 69 | 66 20 28 20 28 74 68 65 |le3);..i|f ( (the|
|000058d0| 45 72 72 20 3d 20 52 65 | 73 45 72 72 6f 72 28 29 |Err = Re|sError()|
|000058e0| 29 20 21 3d 20 6e 6f 45 | 72 72 20 29 20 7b 0d 09 |) != noE|rr ) {..|
|000058f0| 09 50 73 74 72 69 6e 67 | 43 6f 70 79 28 28 63 68 |.Pstring|Copy((ch|
|00005900| 61 72 20 2a 29 74 68 65 | 4d 65 73 73 31 2c 20 22 |ar *)the|Mess1, "|
|00005910| 5c 70 57 72 69 74 65 52 | 65 73 6f 75 72 63 65 20 |\pWriteR|esource |
|00005920| 65 72 72 6f 72 20 69 6e | 20 75 70 64 61 74 65 4e |error in| updateN|
|00005930| 65 77 53 46 52 65 73 46 | 69 6c 65 28 29 22 29 3b |ewSFResF|ile()");|
|00005940| 0d 09 09 4f 53 45 72 72 | 6f 72 28 74 68 65 4d 65 |...OSErr|or(theMe|
|00005950| 73 73 31 2c 20 53 6f 75 | 6e 64 46 69 6c 65 4e 61 |ss1, Sou|ndFileNa|
|00005960| 6d 65 2c 20 74 68 65 45 | 72 72 29 3b 0d 09 09 48 |me, theE|rr);...H|
|00005970| 55 6e 6c 6f 63 6b 28 28 | 48 61 6e 64 6c 65 29 6d |Unlock((|Handle)m|
|00005980| 79 53 74 72 69 6e 67 48 | 61 6e 64 6c 65 33 29 3b |yStringH|andle3);|
|00005990| 0d 09 09 44 69 73 70 6f | 73 48 61 6e 64 6c 65 28 |...Dispo|sHandle(|
|000059a0| 28 48 61 6e 64 6c 65 29 | 6d 79 53 74 72 69 6e 67 |(Handle)|myString|
|000059b0| 48 61 6e 64 6c 65 33 29 | 3b 0d 09 09 72 65 74 75 |Handle3)|;...retu|
|000059c0| 72 6e 28 46 41 4c 53 45 | 29 3b 0d 09 7d 0d 09 48 |rn(FALSE|);..}..H|
|000059d0| 55 6e 6c 6f 63 6b 28 28 | 48 61 6e 64 6c 65 29 6d |Unlock((|Handle)m|
|000059e0| 79 53 74 72 69 6e 67 48 | 61 6e 64 6c 65 33 29 3b |yStringH|andle3);|
|000059f0| 0d 09 44 69 73 70 6f 73 | 48 61 6e 64 6c 65 28 28 |..Dispos|Handle((|
|00005a00| 48 61 6e 64 6c 65 29 6d | 79 53 74 72 69 6e 67 48 |Handle)m|yStringH|
|00005a10| 61 6e 64 6c 65 31 29 3b | 0d 09 44 69 73 70 6f 73 |andle1);|..Dispos|
|00005a20| 48 61 6e 64 6c 65 28 28 | 48 61 6e 64 6c 65 29 6d |Handle((|Handle)m|
|00005a30| 79 53 74 72 69 6e 67 48 | 61 6e 64 6c 65 32 29 3b |yStringH|andle2);|
|00005a40| 0d 09 44 69 73 70 6f 73 | 48 61 6e 64 6c 65 28 28 |..Dispos|Handle((|
|00005a50| 48 61 6e 64 6c 65 29 6d | 79 53 74 72 69 6e 67 48 |Handle)m|yStringH|
|00005a60| 61 6e 64 6c 65 33 29 3b | 0d 09 0d 7d 00 00 00 00 |andle3);|...}....|
|00005a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005a80| 00 00 01 00 00 00 01 16 | 00 00 00 16 00 00 00 46 |........|.......F|
|00005a90| 00 00 04 b4 16 4c 69 6e | 6f 74 72 6f 6e 69 63 20 |.....Lin|otronic |
|00005aa0| 31 30 30 2f 33 30 30 2e | 61 70 64 30 02 00 00 00 |100/300.|apd0....|
|00005ab0| 0d 4d 75 73 69 63 34 43 | 46 69 6c 65 2e 63 02 00 |.Music4C|File.c..|
|00005ac0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005ae0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005af0| 00 00 a3 14 39 22 00 00 | 00 00 00 00 01 5c 00 00 |....9"..|.....\..|
|00005b00| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b10| 00 00 18 00 00 00 04 b4 | 12 4c 69 6e 6f 74 72 6f |........|.Linotro|
|00005b20| 6e 69 63 20 35 30 30 2e | 61 70 64 30 02 00 00 00 |nic 500.|apd0....|
|00005b30| 54 45 58 54 4d 41 43 42 | 01 00 ff 8f 01 35 00 00 |TEXTMACB|.....5..|
|00005b40| 00 00 04 c6 00 00 00 00 | 32 54 00 00 36 00 00 00 |........|2T..6...|
|00005b50| 00 00 00 00 00 00 00 00 | 9e da fc e1 9f 1c 9c 3f |........|.......?|
|00005b60| a1 aa b9 01 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005b70| 00 00 00 00 00 00 28 16 | 00 09 00 00 00 00 00 00 |......(.|........|
|00005b80| 00 00 00 04 00 06 00 04 | 00 00 00 0a 00 0a 07 43 |........|.......C|
|00005b90| 6f 75 72 69 65 72 00 00 | 01 00 00 00 01 16 00 00 |ourier..|........|
|00005ba0| 00 16 00 00 00 46 00 32 | 48 c4 05 26 00 00 00 1c |.....F.2|H..&....|
|00005bb0| 00 46 00 01 45 54 41 42 | 00 00 00 12 45 46 4e 54 |.F..ETAB|....EFNT|
|00005bc0| 00 00 00 1e 03 ec ff ff | 00 00 00 00 00 2f c9 bc |........|...../..|
|00005bd0| 03 eb ff ff 00 00 00 08 | 00 32 48 08 00 00 00 00 |........|.2H.....|
|00005be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00005bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+